static class Json.DefaultHandler extends JsonHandler<JsonArray,JsonObject>
| Modifier and Type | Field and Description |
|---|---|
protected JsonValue |
value |
parser| 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(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,
String name)
Indicates the end of an object member value in the JSON input.
|
void |
endString(String string)
Indicates the end of a string in the JSON input.
|
(package private) 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, startStringprotected 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()
JsonHandlernull 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)
JsonHandlertrue 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(String string)
JsonHandler'"').endString in class JsonHandler<JsonArray,JsonObject>string - the parsed stringpublic void endNumber(String string)
JsonHandlerendNumber 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)
JsonHandlerend 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, String name)
JsonHandlerend 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 nameJsonValue getValue()
Copyright © 2011–2016 David R. Smith. All rights reserved.