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 voidendArray()End of the current array.abstract voidEnd of the current object.abstract RReturns the result.abstract booleanReturns whether member's name or the end of the current object is expected.abstract booleanReturns whether value separator expected before the next member or value.abstract voidName of a member.abstract voidStart of an array.abstract voidStart of an object.abstract voidParse "false".abstract voidParse "null".abstract voidvalueNumber(BigDecimal number) A number value.abstract voidvalueString(String string) A string value.abstract voidParse "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".nullvalue. -
valueFalse
public abstract void valueFalse()Parse "false".falsevalue. -
valueTrue
public abstract void valueTrue()Parse "true".truevalue. -
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:
trueif it is,falseotherwise
-
isValueSeparatorExpected
public abstract boolean isValueSeparatorExpected()Returns whether value separator expected before the next member or value.- Returns:
trueif it is,falseotherwise
-
getResult
Returns the result.- Returns:
- the result
-