Closed cr-kobyisrael closed 2 years ago
It's private because the representation of JSON internally uses GSON, but that is far from the most popular way of doing it. Making this public would prevent the library from changing it's underlying representation of JSON without a major breaking change for consumers.
However, I understand the desire to avoid using a string representation of JSON all of the time... maybe there is a better solution that avoids coupling to GSON but also allows us to avoid allocating strings to parse for larger JsonLogic programs.
Currently the only public method for parsing is with String, is there any reason why direct use of JsonElement is private and not public ? see: https://github.com/jamsesso/json-logic-java/blob/master/src/main/java/io/github/jamsesso/jsonlogic/ast/JsonLogicParser.java#L25