Package io.deephaven.json
Class ObjectValue
java.lang.Object
io.deephaven.json.Value
io.deephaven.json.ValueRestrictedUniverseBase
io.deephaven.json.ObjectValue
Processes a JSON object as set of named fields.
For example, the following might be modelled as an object with a String "name" field, an int "age" field, and a double "height" field:
{ "name": "Foo", "age": 42, "height": 6.5 }
-
Nested Class Summary
Nested classes/interfaces inherited from class io.deephaven.json.Value
Value.Visitor<T>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe allowed types.boolean
If unknown fields are allowed.static ObjectValue.Builder
builder()
abstract Set<ObjectField>
fields()
The fields.static ObjectValue
The lenient object options.static ObjectValue
The standard object options.static ObjectValue
The strict object options.final <T> T
walk
(Value.Visitor<T> visitor) Methods inherited from class io.deephaven.json.Value
allowMissing, array, field, skip
-
Constructor Details
-
ObjectValue
public ObjectValue()
-
-
Method Details
-
builder
-
lenient
The lenient object options. Allows missing, acceptsJsonValueTypes.objectOrNull()
, and allows unknown fields. The object fields are constructed withObjectField.caseSensitive()
asfalse
andObjectField.repeatedBehavior()
asObjectField.RepeatedBehavior.USE_FIRST
.- Parameters:
fields
- the fields- Returns:
- the lenient object options
-
standard
The standard object options. Allows missing, acceptsJsonValueTypes.objectOrNull()
, and allows unknown fields. The object fields are constructed withObjectField.of(String, Value)
.- Parameters:
fields
- the fields- Returns:
- the standard object options
-
strict
The strict object options. Disallows missing, acceptsJsonValueTypes.object()
, and disallows unknown fields. The object fields are constructed withObjectField.of(String, Value)
.- Parameters:
fields
- the fields- Returns:
- the strict object options
-
fields
The fields. -
allowUnknownFields
@Default public boolean allowUnknownFields()If unknown fields are allowed. By default istrue
. -
allowedTypes
The allowed types. Must be a subset ofJsonValueTypes.objectOrNull()
. By default isJsonValueTypes.objectOrNull()
.- Specified by:
allowedTypes
in classValue
-
walk
-