XSL(T) for JSON

8 views
Skip to first unread message

Jocke Selin

unread,
May 27, 2015, 10:46:15 AM5/27/15
to ox...@googlegroups.com
Hey,

Apropos open and linked data. Sort of.

Not (strictly) Ruby related, but as you’re all a bunch of smart nerds I thought I’d share this (totally un-researched) thing I thought of.

About a thousand Internet years ago (in year 2000-ish) XML was touted to be the next big thing, and some other clever people came up with WSDL and tons of other acronyms. It wasn’t until I saw XSL and XSLT that I found a true use for XML. In fact we built our Internet framework (unheard of in 2000!) based on an XML back end and XSL front end. It drove a hard wedge in between data and presentation. It was awesome. Except for two things; it was dog slow (but today we have the technology) and it was so incredibly verbose that you ended up writing way more XSL than anything else.

Today, JSON has pretty much replaced XML, which I’m personally quite pleased about. However, I thought that there was real power and ingenuity in how XSL managed to pick stuff out of the XML and started wondering what such a thing would look like for JSON. Could one combine XPath-like ideas with JSON? Or should we stick with programmatically extracting and looping over JSON structures? Even if one of my pet annoyances with Web Applications is the extreme amount of languages, mark ups, pseudo-languages, etc that we need to know, this idea might get an approval in my head.

Anyway, it’s just one of those loose thoughts which I think would be quite interesting to soak in a few beers at a meeting one day. :)

Hope last meeting was fun.

Cheers,

/Jocke

Pierre Riteau

unread,
Jun 15, 2015, 1:06:33 PM6/15/15
to ox...@googlegroups.com
Hello,

There are apparently many XPath / XSLT equivalents for JSON. I came
across http://jmespath.org recently.

Check out these threads for many more:

- http://stackoverflow.com/questions/8481380/is-there-a-json-equivalent-of-xquery-xpath
- http://stackoverflow.com/questions/1618038/xslt-equivalent-for-json
- http://programmers.stackexchange.com/questions/264706/xslt-equivalent-for-json

Pierre
> --
> You received this message because you are subscribed to the Google Groups "Oxford Ruby User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to oxrug+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Jocke Selin

unread,
Jun 17, 2015, 4:59:31 AM6/17/15
to ox...@googlegroups.com
Hi Pierre,

Thanks for that. I’ll have to check these out when I find a moment. :) I’m pleased to see that there are options out there. :)

Cheers,

/Jocke
Jocke Selin - jo...@selincite.com - http://jocke.selincite.com/
the....@gmail.com




Reply all
Reply to author
Forward
0 new messages