Skip to content

Cannot use a function define in Java code to use in registerFunction #241

Description

@rjdp

I had this function in my java code that stringifies json

Function<Object, Object> jsonStringify = x -> {
    try {
        return mapper.writeValueAsString(x);
    } catch (JsonProcessingException e) {
        throw new RuntimeException(e);
    }
};

but I cannot do

expr.registerFunction("jsonsStr",  jsonStringify)

, Javascript version of Jsonata allows this.

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions