Hacker News new | ask | show | jobs
by jwdunne 4491 days ago
Correct me if I'm wrong but I think you could get away with:

I don't think your second example is much at all like Lisp and I think to actually achieve something lispy, JSON would need some kind of symbol type, so you can do:

  ['Foo, ['Some Text', ['Bar, 'more text']]]
Though, mix in attributes, and it's just a nightmare.

After all, it's not like:

  '(Foo "Some text" (Bar "more text"))
Or with an admittedly not-very-well-thought-out attribute:

  '(Foo "Some text" (Bar ([] (name "Baz")) "more text"))
For:

  <Foo>Some text <Bar name="Baz">more text</Bar></Foo>
Though there may be a better way of representing attributes....