public class ObjectBuilder extends Object
| Constructor and Description |
|---|
ObjectBuilder(JSONParser parser) |
| Modifier and Type | Method and Description |
|---|---|
void |
addArrayVal(Object arr,
Object val) |
void |
addKeyVal(Object map,
Object key,
Object val) |
static void |
checkEOF(JSONParser p) |
Object |
endArray(Object arr) |
static Object |
fromJSON(String json)
consider to use
fromJSONStrict(String) |
static Object |
fromJSONStrict(String json)
like
fromJSON(String), but also check that there is nothing
remaining in the given string after closing bracket. |
Object |
getArray() |
Object |
getBigNumber() |
Object |
getBoolean() |
Object |
getKey() |
Object |
getLong() |
Object |
getNull() |
Object |
getNumber() |
Object |
getObject() |
Object |
getString() |
Object |
getVal() |
static Object |
getVal(JSONParser parser)
consider to use
getValStrict() |
Object |
getValStrict()
like
getVal(), but also check that there is nothing
remaining in the given stream after closing bracket. |
static Object |
getValStrict(JSONParser parser)
like
getVal(), but also check that there is nothing
remaining in the given stream after closing bracket. |
Object |
newArray() |
Object |
newObject() |
Object |
objectEnd(Object obj) |
public ObjectBuilder(JSONParser parser) throws IOException
IOExceptionpublic static Object fromJSON(String json) throws IOException
fromJSONStrict(String)IOExceptionpublic static Object fromJSONStrict(String json) throws IOException
fromJSON(String), but also check that there is nothing
remaining in the given string after closing bracket.
Throws JSONParser.ParseException otherwise.IOExceptionpublic static void checkEOF(JSONParser p) throws IOException
IOExceptionpublic static Object getVal(JSONParser parser) throws IOException
getValStrict()IOExceptionpublic static Object getValStrict(JSONParser parser) throws IOException
getVal(), but also check that there is nothing
remaining in the given stream after closing bracket.
Throws JSONParser.ParseException otherwise.IOExceptionpublic Object getValStrict() throws IOException
getVal(), but also check that there is nothing
remaining in the given stream after closing bracket.
Throws JSONParser.ParseException otherwise.IOExceptionpublic Object getVal() throws IOException
IOExceptionpublic Object getString() throws IOException
IOExceptionpublic Object getLong() throws IOException
IOExceptionpublic Object getNumber() throws IOException
IOExceptionpublic Object getBigNumber() throws IOException
IOExceptionpublic Object getBoolean() throws IOException
IOExceptionpublic Object getNull() throws IOException
IOExceptionpublic Object newObject() throws IOException
IOExceptionpublic Object getKey() throws IOException
IOExceptionpublic void addKeyVal(Object map, Object key, Object val) throws IOException
IOExceptionpublic Object getObject() throws IOException
IOExceptionpublic Object newArray()
public void addArrayVal(Object arr, Object val) throws IOException
IOExceptionpublic Object getArray() throws IOException
IOExceptionCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.