JSON related functions

class metapensiero.sqlalchemy.proxy.json.JSON

Namespace-class to make it easier replacing the actual implementation of the methods using a different JSON library such as python-rapidjson.

static decode(s)

Parse s, a JSON encoded string, and return the equivalent Python structure.

This is implemented on top of nssjson, to handle UUID, datetime, date and Decimal data types.

static encode(o)

Encode o, an arbitrary Python object, into a JSON encoded string.

This is implemented on top of nssjson, to handle UUID, datetime, date and Decimal data types.

metapensiero.sqlalchemy.proxy.json.register_json_decoder_encoder(decode, encode)

Replace the JSON decode and encode functions.