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
IOException
public static Object fromJSON(String json) throws IOException
fromJSONStrict(String)
IOException
public 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.IOException
public static void checkEOF(JSONParser p) throws IOException
IOException
public static Object getVal(JSONParser parser) throws IOException
getValStrict()
IOException
public 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.IOException
public Object getValStrict() throws IOException
getVal()
, but also check that there is nothing
remaining in the given stream after closing bracket.
Throws JSONParser.ParseException
otherwise.IOException
public Object getVal() throws IOException
IOException
public Object getString() throws IOException
IOException
public Object getLong() throws IOException
IOException
public Object getNumber() throws IOException
IOException
public Object getBigNumber() throws IOException
IOException
public Object getBoolean() throws IOException
IOException
public Object getNull() throws IOException
IOException
public Object newObject() throws IOException
IOException
public Object getKey() throws IOException
IOException
public void addKeyVal(Object map, Object key, Object val) throws IOException
IOException
public Object getObject() throws IOException
IOException
public Object newArray()
public void addArrayVal(Object arr, Object val) throws IOException
IOException
public Object getArray() throws IOException
IOException
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.