public static class Json.DefaultHandler extends JsonHandler<JsonArray,JsonObject>
Constructor and Description |
---|
DefaultHandler() |
Modifier and Type | Method and Description |
---|---|
void |
endArray(JsonArray array)
Indicates the end of an array in the JSON input.
|
void |
endArrayValue(JsonArray array)
Indicates the end of an array element in the JSON input.
|
void |
endBoolean(boolean bool)
Indicates the end of a boolean literal (
true or false ) in the JSON
input. |
void |
endNull()
Indicates the end of a
null literal in the JSON input. |
void |
endNumber(java.lang.String string)
Indicates the end of a number in the JSON input.
|
void |
endObject(JsonObject object)
Indicates the end of an object in the JSON input.
|
void |
endObjectValue(JsonObject object,
java.lang.String name)
Indicates the end of an object member value in the JSON input.
|
void |
endString(java.lang.String string)
Indicates the end of a string in the JSON input.
|
JsonValue |
getValue() |
JsonArray |
startArray()
Indicates the beginning of an array in the JSON input.
|
JsonObject |
startObject()
Indicates the beginning of an object in the JSON input.
|
endObjectName, getLocation, startArrayValue, startBoolean, startNull, startNumber, startObjectName, startObjectValue, startString
protected JsonValue value
public JsonArray startArray()
JsonHandler
'['
).
This method may return an object to handle subsequent parser events for this array. This array
handler will then be provided in all calls to startArrayValue()
, endArrayValue()
, and
endArray()
for this array.
startArray
in class JsonHandler<JsonArray,JsonObject>
null
if not neededpublic JsonObject startObject()
JsonHandler
'{'
).
This method may return an object to handle subsequent parser events for this object. This
object handler will be provided in all calls to startObjectName()
, endObjectName()
,
startObjectValue()
,
endObjectValue()
, and endObject()
for this object.
startObject
in class JsonHandler<JsonArray,JsonObject>
null
if not neededpublic void endNull()
JsonHandler
null
literal in the JSON input. This method will be called
after reading the last character of the literal.endNull
in class JsonHandler<JsonArray,JsonObject>
public void endBoolean(boolean bool)
JsonHandler
true
or false
) in the JSON
input. This method will be called after reading the last character of the literal.endBoolean
in class JsonHandler<JsonArray,JsonObject>
bool
- the parsed boolean valuepublic void endString(java.lang.String string)
JsonHandler
'"'
).endString
in class JsonHandler<JsonArray,JsonObject>
string
- the parsed stringpublic void endNumber(java.lang.String string)
JsonHandler
endNumber
in class JsonHandler<JsonArray,JsonObject>
string
- the parsed number stringpublic void endArray(JsonArray array)
JsonHandler
']'
).endArray
in class JsonHandler<JsonArray,JsonObject>
array
- the array handler returned from JsonHandler.startArray()
, or null
if not
providedpublic void endObject(JsonObject object)
JsonHandler
'}'
).endObject
in class JsonHandler<JsonArray,JsonObject>
object
- the object handler returned from JsonHandler.startObject()
, or null if not providedpublic void endArrayValue(JsonArray array)
JsonHandler
end
method for the
specific element type (like endString()
, endNumber()
, etc.).endArrayValue
in class JsonHandler<JsonArray,JsonObject>
array
- the array handler returned from JsonHandler.startArray()
, or null
if not
providedpublic void endObjectValue(JsonObject object, java.lang.String name)
JsonHandler
end
method for the
specific member type (like endString()
, endNumber()
, etc.).endObjectValue
in class JsonHandler<JsonArray,JsonObject>
object
- the object handler returned from JsonHandler.startObject()
, or null if not providedname
- the parsed member namepublic JsonValue getValue()