Skip to content

Advanced path string syntax for slicing #2

@bauerca

Description

@bauerca

Currently, only one value can be extracted from a JSON stream; for example, fetching 2 values from a large array requires two stream passes. A JSON path string syntax for complex slicing would allow extracting multiple values from a single stream.

Some things to consider:

  • Output order must match order in stream. (requesting, for example, [arr[1], arr[0]] is impossible)
  • Other things. :)

An enhanced path string could basically be JSON where values are path strings. For example:

{"dogs": dogs[0:3], "cat_breeds": cats[:].breed}

where the example also introduces an array slicing syntax similar to python and a map function that allows picking attributes over an array of objects.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions