Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

JsonML (JSON Markup Language). An almost non-lossy serialization format for sending XML as JSON (plain text in between elements is ignored). Uses the (element-name, attribute-dictionary, list-of-children) tuple format, which sadly means many common cases end up taking more bytes than the original XML. Still an improvement on serializations that behave differently when a list of children has only one item in it.

Tagged , , ,

4 comments

  1. What, no namespace support? Seriously though, it does look like it may have its uses. Someday one of those uses might even cross my path.

    Marty Alchin - 10th February 2009 15:47 - #

  2. Actually, it looks like it does treat single children differently. And the attribute dictionary is optional...

    phl - 10th February 2009 17:53 - #

  3. I take that back about the single children--those only represent text, never elements.

    phl - 10th February 2009 17:56 - #

  4. The reason why we currently have both XML and JSON is the same reason why it's impossible to do a good automatic conversion between them: they're each good for different things, and so their underlying models are fundamentally different.

    People just need to pick whichever one makes most sense of their application and run with it. The tools and libraries will catch up.

    Martin Atkins - 11th February 2009 03:42 - #

Comments are closed.
A django site