Given this JSON object
{
"object": {
"0":"0",
"1":"1",
"2":"2",
}
}
Trying to run
Configuration configuration = Configuration.defaultConfiguration().jsonProvider(new JacksonJsonNodeJsonProvider()).mappingProvider(new JacksonMappingProvider()).addOptions(Option.AS_PATH_LIST);
DocumentContext context = JsonPath.parse(JSON_NODE, configuration);
context.read("$.object['0', '1']")
will return [ "[$['object']['0', '1']]" ].
I believe the result should be [ "[$['object']['0']]", "[$['object']['1']]" ]
Given this JSON object
Trying to run
will return
[ "[$['object']['0', '1']]" ].I believe the result should be
[ "[$['object']['0']]", "[$['object']['1']]" ]