xsl-list
[Top] [All Lists]

Re: [xsl] XSLT functions for JSON

2008-05-18 13:21:16
On Sun, 18 May 2008 13:54:48 -0600, Dimitre Novatchev <dnovatchev(_at_)gmail(_dot_)com> wrote:
 * Is it worth the effort to find ways of transforming JSON into another
serialization format and/or back into JSON (e.g. filtering) using XSLT?

This is the best question.  No, in my opinion.

I agree, though it seems there are others who are convinced there is value in JSON. The bigger question is one of: Will there ever be a case where JSON is provided instead of XML. If there is always an XML serialization of a given data set, then no, there is no derived value in transforming JSON. But I'm not convinced that somewhere along the way, some genius will decide they are only going to provide a JSON version of their data. If that geniuses company -- or better said -- the data that company provides is of significant interest to developers, then it may be something that needs to be considered.

 * Is this possible with XSLT 1.0, or is this strictly an XSLT 2.0-type
solution?

Many things are possible, but are they worth the effort?

As per above, depends on the data in question.

We should not try to correct something that is broken

Oh, I absolutely agree.

No, because this would no longer be JSON

Well, yes and no. You can remove all usage of attributes from your XML, and still be both valid and useful. That doesn't mean its been used properly, but it can still be used.

Are you sure?

Sure. I rarely use DTD declarations in my XML files. That doesn't mean that others don't use DTD declarations, just that in my daily use of XML I'm able to avoid them and get by just fine.

This has to be directed to whoever cares about JSON, we are members of
the xsl-list

Well, if the need to transform JSON becomes more prevalent, my guess is that more of us will begin to care.

Of course lets hope it never gets to that point, but I'm not always confident in other peoples ability to make the right decision as far as data formats go.

This conversation cannot be productive because it is about a broken
concept (JSON/XML equivalence).

Well I was hoping to steer this away from the the JSON/XML equivalence and towards one of simply transforming JSON with XSLT. But if there's always an XML version of a given dataset provided by one web service data provider or another, then you're right, there is no point.

--
/M:D

M. David Peterson
Co-Founder & Chief Architect, 3rd&Urban, LLC
Email: m(_dot_)david(_at_)3rdandUrban(_dot_)com | 
m(_dot_)david(_at_)amp(_dot_)fm
Mobile: (206) 999-0588
http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>