In trying to implement a service with clj-jq that receives requests in JSON form and sends responses in JSON form, it makes sense to deserialize as little as possible.
However, trying to pass a JsonNode (corresponding with {"n": 100} to an expression that uses a variable $n) for vars presently results in the following:
java.lang.UnsupportedOperationException: nth not supported on this type: IntNode
at clojure.lang.RT.nthFrom (RT.java:992)
clojure.lang.RT.nth (RT.java:940)
jq.api.api_impl$new_scope.invokeStatic (api_impl.clj:154)
jq.api.api_impl$new_scope.invoke (api_impl.clj:144)
jq.api$stream_processor.invokeStatic (api.clj:83)
jq.api$stream_processor.invoke (api.clj:75)
In trying to implement a service with clj-jq that receives requests in JSON form and sends responses in JSON form, it makes sense to deserialize as little as possible.
However, trying to pass a JsonNode (corresponding with
{"n": 100}
to an expression that uses a variable$n
) for vars presently results in the following: