News for hackers. Stuff that matters.
Re:XML is not S-Expressions by fizx on Tuesday January 13, 2009 @02:36AM (#431775)
I see what you're saying. But I use json to encode my latest language (release in the coming week). But its a really limited case. It would suck in the general case, but its not always terrible (I hope). Just sayin.
Re:XML is not S-Expressions by gruseom on Tuesday January 13, 2009 @01:07PM (#432374)
Exceptions are welcome :) But why are you doing this? Just curious.

Actually, in my current project we use JSON to encode parse trees. It's no s-expressions, but it works pretty well.

Re:XML is not S-Expressions by fizx on Tuesday January 13, 2009 @01:37PM (#432424)
Its an embedded language for xml/html data extraction/scraping. It's inspired by MQL ( http://www.freebase.com/tools/queryeditor/ , look for the examples link towards the bottom), which should give you an idea of how json can be used to represent structure.

The Ruby and Python bindings let you choose between JSON and the native hash/array or list/dictionary structures. You can be idiomatic and portable at the same time.

Re:XML is not S-Expressions by 11ren on Tuesday January 13, 2009 @09:17PM (#433056)
That's very cool. JSON seems a natural conceptual match for querying data like that. I think a different concrete syntax might be more readable for me - but could just be my unfamiliarity. And JSON is an instant, no-work solution, so there's no downside. It would be good to see your project.