hydra.json.model module
A JSON syntax model. See the BNF at https://www.json.org.
- class hydra.json.model.Value
Bases:
objectValueArray | ValueBoolean | ValueNull | ValueNumber | ValueObject | ValueString
- ARRAY = Name(value='array')
- BOOLEAN = Name(value='boolean')
- NULL = Name(value='null')
- NUMBER = Name(value='number')
- OBJECT = Name(value='object')
- STRING = Name(value='string')
- TYPE_ = Name(value='hydra.json.model.Value')
- class hydra.json.model.ValueNull
Bases:
objectJSON’s null value
- class hydra.json.model.ValueObject(value: T)
Bases:
Node[Sequence[tuple[str, Value]]]A JSON object as an ordered list of key/value pairs. The ordering preserves the declaration order of the record from which the object was encoded, rather than alphabetizing keys. As a consequence, equality of Value objects is order-sensitive: two objects with the same pairs in a different order are equal as JSON, but not as Hydra Values.