Skip to content

Incorrect each function signature validation #79

@sergeevik

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions