{{ vars.json_serializer|imports }}
{{ vars.ui.marshmallow.class|imports }}
{{ vars.json_serializer.format_serializer_cls|imports }}
{{ vars.json_serializer.list_schema_cls|imports }}


class {{ vars.json_serializer|class_header }}:
    """UI JSON serializer."""

    def __init__(self):
        """Initialise Serializer."""
        super().__init__(
            format_serializer_cls={{ vars.json_serializer.format_serializer_cls|base_name }},
            object_schema_cls={{vars.ui.marshmallow.class|base_name}},
            list_schema_cls={{ vars.json_serializer.list_schema_cls|base_name }},
            schema_context={"object_key": "ui"},
        )

{{ vars.json_serializer|extra_code }}