write-json-file regression
Closed this issue · 5 comments
edporras commented
@domparry bad news, I've ran into a problem with the output generated in that objects are getting stringified. ex., generating a pcoll of
[{:id "23" :vals #{{:id "41" :views 342} {:id "52" :views 41}}}
{:id "15" :vals #{{:id "44" :views 4} {:id "492" :views 59}}}]
results in this when calling write-json-file
:
{"id":"23","vals":"#{{:id \"52\", :views 41} {:id \"41\", :views 342}}"}
{"id":"15","vals":"#{{:id \"492\", :views 59} {:id \"44\", :views 4}}"}
At first I was baffled how the test was not catching this and then I realized… I never added a write-json-file test 🤦♂️😭
I'll take a look at this tomorrow or over the weekend.
domparry commented
oh dear. I'll take a look at how cheshire handles sets.
edporras commented
I believe both Cheshire and data.json represent sets using vectors when writing. Should we check with Chris?
domparry commented
You are correct. I have created an issue for Chris here: cnuernber/charred#6