public class JacksonJsonParser extends AbstractJsonParser
ObjectMapper
to JsonParser
.JsonParserFactory
Constructor and Description |
---|
JacksonJsonParser()
Creates an instance with a default
ObjectMapper that is created lazily. |
JacksonJsonParser(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Creates an instance with the specified
ObjectMapper . |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.Object> |
parseList(java.lang.String json)
Parse the specified JSON string into a List.
|
java.util.Map<java.lang.String,java.lang.Object> |
parseMap(java.lang.String json)
Parse the specified JSON string into a Map.
|
parseList, parseMap, trimParse, tryParse
public JacksonJsonParser(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
ObjectMapper
.objectMapper
- the object mapper to usepublic JacksonJsonParser()
ObjectMapper
that is created lazily.public java.util.Map<java.lang.String,java.lang.Object> parseMap(java.lang.String json)
JsonParser
json
- the JSON to parsepublic java.util.List<java.lang.Object> parseList(java.lang.String json)
JsonParser
json
- the JSON to parse