Select Transform: JSON template over JSON
selecttransform.github.io
Select Transform: JSON template over JSON
1–10 of 76 posts
Re: Select Transform: JSON template over JSON
#2Re: Select Transform: JSON template over JSON
#3XSLT for JSON?
XSLT is very powerful but also incredibly messy because it has to be expressed in XML.
Doing the same in JSON seems like it would result in the same problem.
Re: Select Transform: JSON template over JSON
#4Would that be a good use case for this?
Re: Select Transform: JSON template over JSON
#5XSLT for JSON?
That's the first thing that came to my mind too. XSLT is very powerful but also incredibly messy because it has to be expressed in XML. Doing the same in JSON seems like it would result in the same problem.
dbaseIIIplus was the one that actually almost managed this feat.
Re: Select Transform: JSON template over JSON
#6I also would like to know in which situation this is preferable to jq.
Re: Select Transform: JSON template over JSON
#7Re: Select Transform: JSON template over JSON
#8Currently I'm having issues trying to figure out a new stack where we can't figure out where to put the backend for front-end logic in a React App over the top of GraphQL. I've been thinking of implementing something like this as the transforms or the formatters don't make a ton of sense to be on the client or the API or in GraphQL and I'm loathe to make another API call in the chain as it feels like I there's enough…
Basically you can send the JSON template over JSON to the server, and let the server transform the raw data using the template before returning.
The most important benefit here is that, since everything can be expressed in JSON, it can be stored or transmitted over the Internet, which enables interesting cases like this.
Re: Select Transform: JSON template over JSON
#9I can't wait to play around with this.
Re: Select Transform: JSON template over JSON
#10XSLT for JSON?
This particular implementation looks a bit messy though - XSLT is valid XML and Xpath, while this solution uses templating syntax. That's more human readable, but also slightly inconsequent - you wouldn't be able to validate such a template with json schema for example.