Skip to content

Incorrect each function signature validation #79

Description

@sergeevik

jsonata-java version 0.9.9

Example:
json: empty {}
jsonata expression: [] ~> $each(?, function($v) { $v })

expected result: empty
actual result: com.dashjoin.jsonata.JException: Argument "1" of Object "each" does not match Object signature

details from debug:
functionName: each
badSig: af
partialPattern: ^[om]?
badArgs:
0 - Utils@JList
1 - ParserSymbol

to reproduce the bug use simple test:
@Test public void testEach() { var expression = Jsonata.jsonata("[] ~> $each(?, function($v) { $v })"); expression.evaluate("{}"); }
On https://try.jsonata.org/ example work correct, return ** no match **
Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions