We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given a hashmap with lazy-seq keys, jsonista does not force their evaluation.
lazy-seq
In all other cases that I came up with, lazy-seqs are forced (values in hashmaps, other containers, nested), hence I assume that this is a bug.
See the following repl session:
jsonista.core-test> (j/write-value-as-string {(lazy-seq '(:key)) :value}) ;; bug "{\"clojure.lang.LazySeq@3cd66127\":\"value\"}" jsonista.core-test> (j/write-value-as-string {:key (lazy-seq '(:value))}) ;; correct "{\"key\":[\"value\"]}" jsonista.core-test> (j/write-value-as-string (lazy-seq (list (lazy-seq '(:one))))) ;; correct "[[\"one\"]]" jsonista.core-test> (j/write-value-as-string [(lazy-seq '(:one)) (lazy-seq '(:two))]) ;; correct "[[\"one\"],[\"two\"]]"
The text was updated successfully, but these errors were encountered:
JSON object keys are strings, so the correct result would be like this:
user=> (j/write-value-as-string {'(:key) :value}) "{\"(:key)\":\"value\"}"
Sorry, something went wrong.
No branches or pull requests
Given a hashmap with
lazy-seq
keys, jsonista does not force their evaluation.In all other cases that I came up with,
lazy-seq
s are forced (values in hashmaps, other containers, nested), hence I assume that this is a bug.See the following repl session:
The text was updated successfully, but these errors were encountered: