vizicities
vizicities copied to clipboard
Improve the Blueprint API to support complex transformations
Further to the discussion in #104 on changes to the Blueprint API to allow for merging and modifying data (eg. data flow and node graphs), the Blueprint API also needs improvements to the way it handles and allows for complex transformations to data and how those transformations are defined as JSON.
After initial discussion it looks like a perfect solution is very much like what XSLT does for XML, albeit perhaps a little less convoluted. Here are the results of early research into the area of defining transforms with JSON:
- JSONT – Particularly the two-dimensional array example at the bottom
-
Tempo – I like the
Tempo.prepare(template).render(data);
approach - Jolt – Written in Java for some reason but looks interesting
- jq – On the commend line but the API is quite simple and seemingly powerful
- JSONiq – Looks a bit mental but allows for complex transforms
- json2json – Looks simple enough, though not sure it can handle the complex use-cases
- And finally, XSLT itself shouldn't be ruled out. After looking into it more it certainly looks powerful and the benefit is that it's already known and well documented. Looks like it's not unheard of to use XSLT to transform JSON.