Skip to content
New issue

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

exception on writing maps where a key is a map #28

Open
flyingmachine opened this issue Oct 14, 2024 · 1 comment
Open

exception on writing maps where a key is a map #28

flyingmachine opened this issue Oct 14, 2024 · 1 comment

Comments

@flyingmachine
Copy link

This:

(charred.api/write-json-str {{:a :b} {:c :d}})

Results in this:

Execution error (CharredException) at charred.JSONWriter/writeMap (JSONWriter.java:189).
JSON encoding error - Map keys must be strings

My expectation is that {:a :b} would be stringified. It's not immediately obvious to me how to work around this

@cnuernber
Copy link
Owner

Well that won't round trip -- but neither do keyword map keys -- I agree that it should apply str as opposed to exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants