# SerializerConfig

class xsdata.formats.dataclass.serializers.config.SerializerConfig(encoding='UTF-8', xml_version='1.0', xml_declaration=True, pretty_print=False, pretty_print_indent=None, ignore_default_attributes=False, schema_location=None, no_namespace_schema_location=None, globalns=None)

  Serializer configuration options.

  Some options are not applicable for both xml or json documents.

  Parameters:

    - encoding (`str`) – Text encoding

    - xml_version (`str`) – XML Version number (1.0|1.1)

    - xml_declaration (`bool`) – Generate XML declaration

    - pretty_print (`bool`) – Enable pretty output

    - pretty_print_indent (`Optional`[`str`]) – Indentation string for each indent level

    - ignore_default_attributes (`bool`) – Ignore optional attributes with default values

    - schema_location (`Optional`[`str`]) – xsi:schemaLocation attribute value

    - no_namespace_schema_location (`Optional`[`str`]) – xsi:noNamespaceSchemaLocation attribute value

    - globalns (`Optional`[`Dict`[`str`, `Callable`]]) – Dictionary containing global variables to extend or overwrite for typing