- class tiled.media_type_registration.SerializationRegistry¶
Registry of media types for each structure family
Register a JSON writer for “array” structures. (This is included by default but it is shown here as a simple example.)
>>> import json >>>> serialization_registry.register( "array", "application/json", lambda array: json.dumps(array.tolist()).encode() )
List the aliases (file extensions) for each media type for a given structure family.
Look up a writer for a given structure and media type.
List the supported media types for a given structure family.
register(structure_family, media_type, func)
Register a new media_type for a structure family.
List the known structure families.