Class JsonLineMapper

java.lang.Object
org.springframework.batch.item.file.mapping.JsonLineMapper
All Implemented Interfaces:
LineMapper<Map<String,Object>>

public class JsonLineMapper extends Object implements LineMapper<Map<String,Object>>
Interpret a line as a JSON object and parse it up to a Map. The line should be a standard JSON object, starting with "{" and ending with "}" and composed of name:value pairs separated by commas. Whitespace is ignored, e.g.
 { "foo" : "bar", "value" : 123 }
 
The values can also be JSON objects (which are converted to maps):
 { "foo": "bar", "map": { "one": 1, "two": 2}}
 
Author:
Dave Syer