Class JacksonJsonParser
java.lang.Object
org.springframework.boot.json.AbstractJsonParser
org.springframework.boot.json.JacksonJsonParser
- All Implemented Interfaces:
JsonParser
Thin wrapper to adapt Jackson 3
JsonMapper to JsonParser.- Since:
- 1.0.0
- Author:
- Dave Syer
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance with a defaultJsonMapperthat is created lazily.JacksonJsonParser(tools.jackson.databind.json.JsonMapper jsonMapper) Creates an instance with the specifiedJsonMapper. -
Method Summary
Methods inherited from class AbstractJsonParser
parseList, parseMap, trimParse, tryParse
-
Constructor Details
-
JacksonJsonParser
public JacksonJsonParser(tools.jackson.databind.json.JsonMapper jsonMapper) Creates an instance with the specifiedJsonMapper.- Parameters:
jsonMapper- the JSON mapper to use
-
JacksonJsonParser
public JacksonJsonParser()Creates an instance with a defaultJsonMapperthat is created lazily.
-
-
Method Details
-
parseMap
Description copied from interface:JsonParserParse the specified JSON string into a Map.- Parameters:
json- the JSON to parse- Returns:
- the parsed JSON as a map
-
parseList
Description copied from interface:JsonParserParse the specified JSON string into a List.- Parameters:
json- the JSON to parse- Returns:
- the parsed JSON as a list
-