Skip to content

JSON

This module define functions to serialize and deserialize objects to and from JSON format. The deserialization of objects is performed using a wrapped version of the awesome and lighting fast JSMN library

dumps

dumps(obj)

Returns a bytearray containing the JSON representation of obj.

Raises JSONError when obj contains non serializable objects.

loads

loads(data)

Returns the object represented in JSON format inside the byte sequence data.

Raises JSONError when data contains bad JSON.