Package org.h2.util.json
Class JSONValidationTargetWithoutUniqueKeys
java.lang.Object
org.h2.util.json.JSONTarget<JSONItemType>
org.h2.util.json.JSONValidationTarget
org.h2.util.json.JSONValidationTargetWithoutUniqueKeys
JSON validation target without unique keys.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private static final byte
private boolean
private static final byte
private final ByteStack
private JSONItemType
-
Constructor Summary
ConstructorsConstructorDescriptionCreates new instance of JSON validation target without unique keys. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
afterValue
(JSONItemType type) private void
void
endArray()
End of the current array.void
End of the current object.Returns the result.boolean
Returns whether member's name or the end of the current object is expected.boolean
Returns whether value separator expected before the next member or value.void
Name of a member.void
Start of an array.void
Start of an object.void
Parse "false".void
Parse "null".void
valueNumber
(BigDecimal number) A number value.void
valueString
(String string) A string value.void
Parse "true".
-
Field Details
-
OBJECT
private static final byte OBJECT- See Also:
-
ARRAY
private static final byte ARRAY- See Also:
-
type
-
stack
-
needSeparator
private boolean needSeparator -
afterName
private boolean afterName
-
-
Constructor Details
-
JSONValidationTargetWithoutUniqueKeys
public JSONValidationTargetWithoutUniqueKeys()Creates new instance of JSON validation target without unique keys.
-
-
Method Details
-
startObject
public void startObject()Description copied from class:JSONTarget
Start of an object.- Specified by:
startObject
in classJSONTarget<JSONItemType>
-
endObject
public void endObject()Description copied from class:JSONTarget
End of the current object.- Specified by:
endObject
in classJSONTarget<JSONItemType>
-
startArray
public void startArray()Description copied from class:JSONTarget
Start of an array.- Specified by:
startArray
in classJSONTarget<JSONItemType>
-
endArray
public void endArray()Description copied from class:JSONTarget
End of the current array.- Specified by:
endArray
in classJSONTarget<JSONItemType>
-
member
Description copied from class:JSONTarget
Name of a member.- Specified by:
member
in classJSONTarget<JSONItemType>
- Parameters:
name
- the name
-
valueNull
public void valueNull()Description copied from class:JSONTarget
Parse "null".null
value.- Specified by:
valueNull
in classJSONTarget<JSONItemType>
-
valueFalse
public void valueFalse()Description copied from class:JSONTarget
Parse "false".false
value.- Specified by:
valueFalse
in classJSONTarget<JSONItemType>
-
valueTrue
public void valueTrue()Description copied from class:JSONTarget
Parse "true".true
value.- Specified by:
valueTrue
in classJSONTarget<JSONItemType>
-
valueNumber
Description copied from class:JSONTarget
A number value.- Specified by:
valueNumber
in classJSONTarget<JSONItemType>
- Parameters:
number
- the number
-
valueString
Description copied from class:JSONTarget
A string value.- Specified by:
valueString
in classJSONTarget<JSONItemType>
- Parameters:
string
- the string
-
beforeValue
private void beforeValue() -
afterValue
-
isPropertyExpected
public boolean isPropertyExpected()Description copied from class:JSONTarget
Returns whether member's name or the end of the current object is expected.- Specified by:
isPropertyExpected
in classJSONTarget<JSONItemType>
- Returns:
true
if it is,false
otherwise
-
isValueSeparatorExpected
public boolean isValueSeparatorExpected()Description copied from class:JSONTarget
Returns whether value separator expected before the next member or value.- Specified by:
isValueSeparatorExpected
in classJSONTarget<JSONItemType>
- Returns:
true
if it is,false
otherwise
-
getResult
Description copied from class:JSONTarget
Returns the result.- Specified by:
getResult
in classJSONValidationTarget
- Returns:
- JSON item type of the top-level item, may not return
JSONItemType.VALUE
-