JSON Utilities

Some JSON encoding and decoding utilities.

class iceprod.core.jsonUtil.json_compressor[source]

Used for files and other large things sent over json. Great for log files.

static compress(obj)[source]
static uncompress(obj)[source]
class iceprod.core.jsonUtil.datetime_converter[source]
static dumps(obj)[source]
static loads(obj, name=None)[source]
class iceprod.core.jsonUtil.date_converter[source]
static loads(obj, name=None)[source]
class iceprod.core.jsonUtil.time_converter[source]
static loads(obj, name=None)[source]
class iceprod.core.jsonUtil.binary_converter[source]

note that is is really only for decode of json, since python bytes are strings

static dumps(obj, name=None)[source]
static loads(obj, name=None)[source]
class iceprod.core.jsonUtil.bytearray_converter[source]
static dumps(obj, name=None)[source]
static loads(obj, name=None)[source]
class iceprod.core.jsonUtil.set_converter[source]
static dumps(obj)[source]
static loads(obj, name=None)[source]
class iceprod.core.jsonUtil.var_converter[source]
static dumps(obj)[source]
static loads(obj, name=None)[source]
class iceprod.core.jsonUtil.iface_converter[source]
static dumps(obj)[source]
static loads(obj, name=None)[source]
class iceprod.core.jsonUtil.repr_converter[source]
static dumps(obj)[source]
static loads(obj, name=None)[source]
iceprod.core.jsonUtil.objToJSON(obj)[source]
iceprod.core.jsonUtil.JSONToObj(obj)[source]
iceprod.core.jsonUtil.recursive_unicode(obj)[source]

Walks a simple data structure, converting byte strings to unicode.

Supports lists, tuples, sets, and dictionaries.

iceprod.core.jsonUtil.json_encode(value, indent=None)[source]

JSON-encodes the given Python object.

iceprod.core.jsonUtil.json_decode(value)[source]

Returns Python objects for the given JSON string.