Package org.springframework.boot.json
Class BasicJsonParser
- java.lang.Object
- org.springframework.boot.json.AbstractJsonParser
- org.springframework.boot.json.BasicJsonParser
- All Implemented Interfaces:
JsonParser
public class BasicJsonParser extends AbstractJsonParser
Really basic JSON parser for when you have nothing else available. Comes with some limitations with respect to the JSON specification (e.g. only supports String values), so users will probably prefer to have a library handle things instead (Jackson or Snake YAML are supported).- Since:
- 1.2.0
- See Also:
JsonParserFactory
Constructor Summary
Constructors Constructor Description BasicJsonParser()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Object>
parseList(String json)
Parse the specified JSON string into a List.Map<String,Object>
parseMap(String json)
Parse the specified JSON string into a Map.Methods inherited from class org.springframework.boot.json.AbstractJsonParser
parseList, parseMap, trimParse, tryParse
Constructor Detail
BasicJsonParser
public BasicJsonParser()
Method Detail
parseMap
public Map<String,Object> parseMap(String json)
Description copied from interface:JsonParser
Parse the specified JSON string into a Map.- Parameters:
json
- the JSON to parse- Returns:
- the parsed JSON as a map
parseList
public List<Object> parseList(String json)
Description copied from interface:JsonParser
Parse the specified JSON string into a List.- Parameters:
json
- the JSON to parse- Returns:
- the parsed JSON as a list