wotpy.codecs.json_codec

Class that implements the JSON codec.

Classes

JsonCodec JSON codec class.
class wotpy.codecs.json_codec.JsonCodec

Bases: wotpy.codecs.base.BaseCodec

JSON codec class.

media_types

Returns the JSON media types.

to_bytes(value)

Takes an object and serializes it to an UTF8 bytes JSON string.

to_value(value)

Takes an encoded value from a request that may be an UTF8 bytes or unicode JSON string and deserializes it to a Python object.