pyvsimJSONEncoder

class pyvsim.System.pyvsimJSONEncoder(skipkeys=False, ensure_ascii=True, check_circular=False, allow_nan=True, sort_keys=True, indent=None, separators=None, encoding='utf-8', default=None)[source]

A JSON Encoder capable of dealing with a pyvsim simulation tree without creating duplicates of objects and solving circular references (at least the type found naturally in a pyvsim tree).

This class is also aware of PyvsimObjects and numpy.ndarrays.

Attributes

Methods

default(obj)[source]

Objects are encoded in a special dictionary, with the magic key “object_type”, which is essential for the unpacking of the object.

It exploits the property __dict__ of the objects to pack the data

This Page