get_serializer

Function get_serializer 

Source
pub fn get_serializer(content_type: &str) -> SerializerResult<SerializerType>
Expand description

Get a serializer type by content type string

Returns the appropriate serializer type for the given content type string, or an error if the content type is not supported.

ยงSupported Content Types

  • application/json - JSON serializer
  • application/x-msgpack - MessagePack serializer (requires msgpack feature)
  • application/x-yaml - YAML serializer (requires yaml feature)
  • application/bson - BSON serializer (requires bson-format feature)