DataEncoder
- class compas.data.DataEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)[source]
Bases:
json.encoder.JSONEncoder
Data encoder for custom JSON serialization with support for COMPAS data structures and geometric primitives.
Notes
In the context of Remote Procedure Calls,
Inherited Attributes
item_separator
key_separator
Methods
Implement this method in a subclass such that it returns a serializable object for
o
, or calls the base implementation (to raise aTypeError
).Inherited Methods
Return a JSON string representation of a Python data structure.
Encode the given object and yield each string representation as available.