jonathan
jonathan copied to clipboard
Encoding a list of lists
I'm attempting to encode an alist value, which is a nested list, as a nested array. cl-json does what I'm looking for:
> (json:encode-json-to-string '((foo . bar) (baz . ((1 2 3) (4 5 6)))))
"{\"foo\":\"bar\",\"baz\":[[1,2,3],[4,5,6]]}"
However, Jonathan does something different, and I can't figure out how to get the nested lists right:
> (jonathan:to-json '((foo . bar) (baz . ((1 2 3) (4 5 6)))) :from :alist)
"{\"FOO\":\"BAR\",\"BAZ\":{\"1\":[2,3],\"4\":[5,6]}}"
Is this expected?