Skip to content

Getting bracket-notated children error #174

@oleg-gr

Description

@oleg-gr

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']]" ]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions