Reputation: 11944
XML files are useful, they have a schema (XSD) and browsers support natively viewing them if an XSLT file is in the same folder (or linked correctly).
But JSON is a more compact and used more and more.
What is counterpart of XSLT in JSON data world and is there native browser support to display large-ish JSON file in a nice formatted way in a browser or across different OSs/browsers.
Upvotes: 1
Views: 327
Reputation:
The closest answer is probably Javascript, however there is no declarative, domain specific language as ubiquitous * as XSLT for transforming JSON objects. The only really way to transform JSON objects is by using a standard programming language that is supported in your environment.
But even then you don't get the power of declarative templates that makes XSLT (on one hand) so easy and more imprtantly predictible to use.
* While Haskell, ML and the like are quite popular declarative languages, they aren't closely related to any one particular data format. Whereas XSLT is is intrinsically tied to XML.
Upvotes: 2