utils.jsonapi#

Module: utils.jsonapi#

JSON serialize to/from utf8 bytes

Changed in version 22.2: Remove optional imports of different JSON implementations. Now that we require recent Python, unconditionally use the standard library. Custom JSON libraries can be used via custom serialization functions.

Functions#

zmq.utils.jsonapi.dumps(o: Any, **kwargs) bytes#

Serialize object to JSON bytes (utf-8).

Keyword arguments are passed along to json.dumps().

zmq.utils.jsonapi.loads(s: Union[bytes, str], **kwargs) Union[Dict, List, str, int, float]#

Load object from JSON bytes (utf-8).

Keyword arguments are passed along to json.loads().