Skip to content

unary minus doesn't negate string args #47

Description

@myazinn

JsonLogic:

{ "-": [ "4" ] }

As Java:

String expression = "{ \"-\": [ \"4\" ] }";
Map<String, Integer> data = new HashMap<>();
System.out.println(new JsonLogic().apply(expression, data));

Expected:
-4
Actual:
4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions