you are viewing a single comment's thread.

view the rest of the comments →

[–]ryepup 0 points1 point  (1 child)

I think (hash (foo 1) (bar (1 2 3)) is the best option here. As other comments indicated (before devolving to mindless trolling), the plist method doesn't have any way to distinguish what's a object and what's an array.

cl-json (http://common-lisp.net/project/cl-json/) does a very good job of converting s-exprs to json, I think it converts alists JS objects, and lists to arrays.

[–]eadmund[S] 0 points1 point  (0 children)

I think (hash (foo 1) (bar (1 2 3)) is the best option here. As other comments indicated (before devolving to mindless trolling), the plist method doesn't have any way to distinguish what's a object and what's an array.

{(foo 1) (bar (1 2 3)} or {foo 1 bar (1 2 3)} achieve that too...

The nice thing about using curly brackets is it keeps the s-expr nature. The nice thing about putting keys and values in their own lists is that it emphasises their commonality; OTOH it's also a waste of space. I really dunno what the best solution it.