Class JsonParser
- java.lang.Object
-
- de.undercouch.citeproc.helper.json.JsonParser
-
public class JsonParser extends java.lang.ObjectParses JSON tokens to maps- Author:
- Michel Kraemer
-
-
Constructor Summary
Constructors Constructor Description JsonParser(JsonLexer lexer)Constructs a new JSON parser
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.Object>parseArray()Parses an arrayjava.util.Map<java.lang.String,java.lang.Object>parseObject()Parses an object into a map
-
-
-
Constructor Detail
-
JsonParser
public JsonParser(JsonLexer lexer)
Constructs a new JSON parser- Parameters:
lexer- a JSON lexer to read from
-
-
Method Detail
-
parseObject
public java.util.Map<java.lang.String,java.lang.Object> parseObject() throws java.io.IOExceptionParses an object into a map- Returns:
- the parsed object
- Throws:
java.io.IOException- if the input stream could not be read or if the input stream contained an unexpected token
-
parseArray
public java.util.List<java.lang.Object> parseArray() throws java.io.IOExceptionParses an array- Returns:
- the parsed array
- Throws:
java.io.IOException- if the input stream could not be read or if the input stream contained an unexpected token
-
-