pypif.util.pif_encoder module¶
-
class
pypif.util.pif_encoder.
PifEncoder
(skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)¶ Bases:
json.encoder.JSONEncoder
Class to convert physical information objects to json.
-
default
(obj)¶ Convert an object to a form ready to dump to json.
Parameters: obj – Object being serialized. The type of this object must be one of the following: None; a single object derived from the Pio class; or a list of objects, each derived from the Pio class. :return: List of dictionaries, each representing a physical information object, ready to be serialized.
-