public class JsonLineMapper extends Object implements LineMapper<Map<String,Object>>
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}}
public Map<String,Object> mapLine(String line, int lineNumber) throws Exception
mapLine
in interface LineMapper<Map<String,Object>>
line
- to be mappedlineNumber
- of the current lineException
- if error occured while parsing.LineMapper.mapLine(String, int)
Copyright © 2014 Pivotal. All rights reserved.