Skip to content

Rework path expression evaluation #3

@shortercode

Description

@shortercode

Our current path expression evaluator is based on a breadth first process that processes data for each path segment in sequence. This is a relatively optimal way to evaluate content but it comes with some tradeoffs in compatibility.

The original algorithm in the JSONata spec is based on a recursive depth first system. This is well suited for certain concepts like binding a variable for a particular branch of the tree. To work around this in our algorithm we had to add a special recurse step for this variable binding, but this doesn't work perfectly.

Resolving these edge cases is becoming increasingly complex and fragile, we've reached the point where the easiest way forward would be to replace our existing algorithm with a depth first system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    JSONata compatibilityCan either capture valid or invalid compatibility issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions