Package org.h2.util.json
Class JSONTarget<R>
java.lang.Object
org.h2.util.json.JSONTarget<R>
- Type Parameters:
R
- the type of the result
- Direct Known Subclasses:
JSONByteArrayTarget
,JSONStringTarget
,JSONValidationTarget
,JSONValueTarget
Abstract JSON output target.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
endArray()
End of the current array.abstract void
End of the current object.abstract R
Returns the result.abstract boolean
Returns whether member's name or the end of the current object is expected.abstract boolean
Returns whether value separator expected before the next member or value.abstract void
Name of a member.abstract void
Start of an array.abstract void
Start of an object.abstract void
Parse "false".abstract void
Parse "null".abstract void
valueNumber
(BigDecimal number) A number value.abstract void
valueString
(String string) A string value.abstract void
Parse "true".
-
Constructor Details
-
JSONTarget
public JSONTarget()
-
-
Method Details
-
startObject
public abstract void startObject()Start of an object. -
endObject
public abstract void endObject()End of the current object. -
startArray
public abstract void startArray()Start of an array. -
endArray
public abstract void endArray()End of the current array. -
member
Name of a member.- Parameters:
name
- the name
-
valueNull
public abstract void valueNull()Parse "null".null
value. -
valueFalse
public abstract void valueFalse()Parse "false".false
value. -
valueTrue
public abstract void valueTrue()Parse "true".true
value. -
valueNumber
A number value.- Parameters:
number
- the number
-
valueString
A string value.- Parameters:
string
- the string
-
isPropertyExpected
public abstract boolean isPropertyExpected()Returns whether member's name or the end of the current object is expected.- Returns:
true
if it is,false
otherwise
-
isValueSeparatorExpected
public abstract boolean isValueSeparatorExpected()Returns whether value separator expected before the next member or value.- Returns:
true
if it is,false
otherwise
-
getResult
Returns the result.- Returns:
- the result
-