Powered by Tachyonic Project Luxon Framework v0.0.0

Luxon Framework for rapid application development. (luxon)

Version

Json

JsonEncoder

class luxon.utils.js._JsonEncoder(skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)[source]

Custom encoder

Overwrites default json.JSONEncoder to support luxon functionality

default(o)[source]

parses data into usable form or encodes it using JSONEncoder.default if it is valid

Parameters:o (obj) – data to be parsed/encoded
Returns:formatted data object

Loads

luxon.utils.js.loads(json_text, **kwargs)[source]

Deserializes a json document to a python object

Parameters:json_text (str/bytes) – document to be deserialized
Returns:python object

Dumps

luxon.utils.js.dumps(obj, indent=4)[source]

Serializes an object as a JSON formatted stream (indented)

Parameters:obj (obj) – object to be serialized
Returns:JSON formatted stream