public class JsonParser extends Object implements Iterator<JsonParser.EventType>, AutoCloseable
| Modifier and Type | Class and Description |
|---|---|
static class |
JsonParser.EventType |
| Constructor and Description |
|---|
JsonParser(InputStream in) |
JsonParser(Reader reader) |
JsonParser(org.springframework.core.io.Resource in) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static List<Object> |
getArray(JsonParser parser) |
int |
getDepth() |
static double[] |
getDoubleArray(JsonParser parser) |
JsonParser.EventType |
getEvent() |
static Map<String,Object> |
getMap(InputStream in) |
static Map<String,Object> |
getMap(JsonParser parser) |
static Map<String,Object> |
getMap(Reader reader) |
static String |
getString(JsonParser parser) |
<T> T |
getValue() |
static Object |
getValue(JsonParser parser) |
boolean |
hasNext() |
JsonParser.EventType |
next() |
static <V> V |
read(InputStream in) |
static <V> V |
read(Object in) |
static <V> V |
read(Reader in) |
static <V> V |
read(String in) |
void |
remove() |
static String |
skipToAttribute(JsonParser parser)
Skip to next attribute in any object.
|
static void |
skipToAttribute(JsonParser parser,
String fieldName)
Skip through the document until the specified object attribute name is
found.
|
static String |
skipToNextAttribute(JsonParser parser)
Skip to next attribute in the same object.
|
String |
toString() |
public JsonParser(InputStream in)
public JsonParser(Reader reader)
public JsonParser(org.springframework.core.io.Resource in)
throws IOException
IOExceptionpublic static List<Object> getArray(JsonParser parser)
public static double[] getDoubleArray(JsonParser parser)
public static Map<String,Object> getMap(InputStream in)
public static Map<String,Object> getMap(JsonParser parser)
public static String getString(JsonParser parser)
public static Object getValue(JsonParser parser)
public static <V> V read(InputStream in)
public static <V> V read(Object in)
public static <V> V read(Reader in)
public static <V> V read(String in)
public static String skipToAttribute(JsonParser parser)
public static void skipToAttribute(JsonParser parser, String fieldName)
parser - The parser.fieldName - The name of the attribute to skip through.public static String skipToNextAttribute(JsonParser parser)
public void close()
close in interface AutoCloseablepublic int getDepth()
public JsonParser.EventType getEvent()
public <T> T getValue()
public boolean hasNext()
hasNext in interface Iterator<JsonParser.EventType>public JsonParser.EventType next()
next in interface Iterator<JsonParser.EventType>public void remove()
remove in interface Iterator<JsonParser.EventType>Copyright © 2015 Revolution Systems Inc.. All rights reserved.