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 ClassesNested classes/interfaces inherited from class io.deephaven.json.Value
Value.Visitor<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe allowed types.booleanIf unknown fields are allowed.static ObjectValue.Builderbuilder()abstract Set<ObjectField>fields()The fields.static ObjectValueThe lenient object options.static ObjectValueThe standard object options.static ObjectValueThe strict object options.final <T> Twalk(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()asfalseandObjectField.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:
allowedTypesin classValue
-
walk
-