JsonReader
- class JsonReader
Unbound reader for JSON deserialization
Members defined in
JsonReader(3 members) Attributes
- property is_bound: bool
Whether there currently is a reader bound to this resource.
Methods
- __init__() None
- bind(s: str) syside.JsonReader
Bind a serialized JSON string for reading.
Note that only one reader can be bound at a time, binding again will raise
ValueError. Suggested usage is through a context manager:with reader.bind(json_str) as json: model, report = deserializer.accept(json, syside.DESERIALIZE_STANDARD)
The reader will attempt to infer the root node as:
The first
Namespace(not subtype) without an owning relationship.The first
Elementthat has no serialized owning related element or owning relationship, starting from the first element in the JSON array, and following owning elements up.The first element in the array otherwise.