Package jsonvalues.spec
Class JsTupleSpec
- java.lang.Object
-
- jsonvalues.spec.JsTupleSpec
-
- All Implemented Interfaces:
JsArraySpec
,JsSpec
public final class JsTupleSpec extends java.lang.Object implements JsArraySpec
Represents a specification of every element of a Json array. It allows to define tuples and the schema of every of its elements.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isRequired()
Returns whether the key is optional.JsTupleSpec
nullable()
Returns the same spec with the nullable flag enabledJsTupleSpec
optional()
Returns the same spec with the optional flag enabledJsSpecParser
parser()
Returns the deserializer used during the parsing process to parse an array of bytes or stringjava.util.Set<JsErrorPair>
test(JsArray array)
java.util.Set<JsErrorPair>
test(JsPath parentPath, JsValue value)
verify if the given value satisfy this spec.
-
-
-
Method Detail
-
isRequired
public boolean isRequired()
Description copied from interface:JsSpec
Returns whether the key is optional.- Specified by:
isRequired
in interfaceJsSpec
- Returns:
- whether the key is optional.
-
nullable
public JsTupleSpec nullable()
Description copied from interface:JsSpec
Returns the same spec with the nullable flag enabled
-
optional
public JsTupleSpec optional()
Description copied from interface:JsSpec
Returns the same spec with the optional flag enabled
-
parser
public JsSpecParser parser()
Description copied from interface:JsSpec
Returns the deserializer used during the parsing process to parse an array of bytes or string
-
test
public java.util.Set<JsErrorPair> test(JsPath parentPath, JsValue value)
Description copied from interface:JsSpec
verify if the given value satisfy this spec.
-
test
public java.util.Set<JsErrorPair> test(JsArray array)
- Specified by:
test
in interfaceJsArraySpec
-
-