{{ vars.json_serializer.imports|generate_import }}
{{ vars.ui.marshmallow.class|generate_import }}

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

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