Module: utils.jsonapi

Priority based json library imports.

Always serializes to bytes instead of unicode for zeromq compatibility on Python 2 and 3.

Use jsonapi.loads() and jsonapi.dumps() for guaranteed symmetry.

Priority: simplejson > jsonlib2 > stdlib json

jsonapi.loads/dumps provide kwarg-compatibility with stdlib json.

jsonapi.jsonmod will be the module of the actual underlying implementation.


zmq.utils.jsonapi.dumps(o, **kwargs)

Serialize object to JSON bytes (utf-8).

See jsonapi.jsonmod.dumps for details on kwargs.

zmq.utils.jsonapi.loads(s, **kwargs)

Load object from JSON bytes (utf-8).

See jsonapi.jsonmod.loads for details on kwargs.