schibsted / jslt

JSON query and transformation language
Apache License 2.0
627 stars 119 forks source link

Are you using JSLT? #49

Open larsga opened 5 years ago

larsga commented 5 years ago

I'd like to list users of JSLT in the readme, but to do that I need to know who they are. If you're using JSLT in your software, please post a comment here to let us know.

larsga commented 5 years ago

One example here https://github.com/CoreMedia/coremedia-headless-server/tree/master/extensions/jslt-postprocessor

vbartacek commented 5 years ago

Hello, I've been working last 6 months on a commercial project and I've decided to use JSLT there. This library is much better than JOLT for sure. We have about 15 JSLT templates 5 to 50 lines long, but we expect that these numbers can grow in future. Unfortunately I cannot share more info right now.

nicosensei commented 5 years ago

Hi, I'm currently using JSLT in a project to transform JSON pulled from MongoDB, and apply some transformations before indexing it into Elasticsearch.

larsga commented 5 years ago

These guys are using JSLT, and will apparently publish an article about it https://medium.com/@FranziCros/throwing-down-the-gauntlet-to-the-data-quality-with-data-schemas-7f702d47114

vector623 commented 5 years ago

Hey, I took interest in this project, because there aren't many projects for persisting json transforms. Ultimately I had issues with the input files not being valid json and had to go another route. I've got some recommendations. Lmk if you are interested.

larsga commented 5 years ago

Yeah, if you don't have valid JSON then JSLT isn't going to help you much.

Recommendations would be interesting!

afranzi commented 5 years ago

Hey @larsga!

We've just published an article about how are we using JSLT expressions at Alpha Health for Evolving and anonymizing our data.

The Datum VEA - Validate, Evolve and Anonymize your data with Data Schemas

vector623 commented 5 years ago

Sorry larsga, I should rephrase; I have valid json for my inputs. However, the jslt transform files themselves are not valid json and this is a limitation.

Microsoft has produced a json transformation spec and implemented it in .NET, which is similar to what you've produced, except it reads in transform files that are themselves json. This is valuable because I want to auto-generate transform files.

I am working on a large Apigee initiative, which is basically an api proxy product from Google. We will use Swagger/OAS to define APIs and require Swagger specs for each API we front. We will be source tracking multiple versions of these swagger files and we need transforms to re-apply revisions to future updates for incoming specifications. Automated json transforms will be part of our governance of these specifications.

Here's the Microsoft project: https://github.com/Microsoft/json-document-transforms

It's not well known, but I think a lot of java developers would find this useful. Perhaps jslt could be expanded to accept Microsoft's input spec?

vector623 commented 5 years ago

Also, great work so far on jslt. Formalized json transformation is needed in development. Unfortunately, many people have settled for imperative transformation, which is not ideal. This is much better than trying to learn/use xslt (which I also looked into) for json transformations.

fredriv commented 5 years ago

Hi Lars Marius! We've started using JSLT in our data platform project for the City of Oslo, of course :-) We're planning to use it for transforming JSON event data, as well as data pipeline configuration templates. In addition, we've built a library for CSV transformation on top of JSLT, which we are planning to open source at some point.

larsga commented 5 years ago

@afranzi Thank you! :)

@vector623 Not making the syntax be JSON was a deliberate choice on my part. I originally did a few designs with a JSON syntax, but they all came out clumsy and awkward to write by hand.

I wasn't aware of that Microsoft project, but it looks very similar to JOLT. Basically, JOLT is one of the things that made me decide to develop JSLT, because JOLT didn't have anything like the expressive power we needed for our transforms. In addition to being rather clumsy. So to be honest it's not something I'm interested in supporting, since it would be a long step backwards.

What could be done, however, is to develop a JSON syntax for JSLT that parses to the same object structure that's used for JSLT now. The question is whether it's worth the effort.

@fredriv That's really nice to hear! :-) That CSV transformation thing sounds interesting. Looking forward to seeing it open sourced.

angelosphere commented 5 years ago

I stumbled over JSLT about two month ago (June 2019). I could not use it immediatly as I had other concerns, so the first "milestone" of the project I basically manually transformed my incoming JSON with Jackson (node traversals based on Consumer)

Now as the second part of the project is starting I'm "fiddeling" with JSLT :D unfortunately I have problems working on arrays that are nested inside of objects.

I'm working for http://www.iab.de/ We transfer internal data as Json to external destinations where it is prepared for publications etc. During that I have to transform and filter the JSON I receive before I forward it.

afranzi commented 4 years ago

@larsga , we talk about JSLT in our Data Council talk :) VEA: Validating, Evolving & Anonymizing Data in Real Time | Alpha Health (Youtube)

larsga commented 4 years ago

Thanks, @afranzi! 👍

fsanti68 commented 4 years ago

Hi @larsga, I started using JSLT for a general usage API that allows creation of unified unstructured data repositories and then creating data-mapping (basically JSLT templates) that produces well-defined data hierarchies published to topics, that may be used to populate specific/vertical repositories.

larsga commented 4 years ago

@fsanti68 That sounds very interesting. I was hoping people would start using JSLT for this sort of thing. Is your project open source? It would be interesting to have a look at it.

wdonne commented 4 years ago

Hi @larsga, I've started using jslt in the context of JSON Event Sourcing, which uses Kafka Streams. The first microservice that transforms JSON is going to be put in production soon.

eutkin commented 4 years ago

@larsga Hi! Interesting project, can you tell us what's with the jslt performance? I'm interested in the case of a lot of small json files

larsga commented 4 years ago

@eutkin At Schibsted we used JSLT in a pipeline that processed 1.2 billion events (small JSON files) every day. It ran something like 9-12 billion transforms a day. We couldn't do that on a single machine, obviously, but performance was not obviously worse than the earlier handwritten transforms.

That's probably not the answer you were looking for, but I don't know of anything that will give you a precise answer other than basically doing some benchmark tests yourself.

up-to-you commented 3 years ago

I think such issue have to be pinned, as more folks will encounter it and share their experience

larsga commented 3 years ago

@up-to-you I didn't know that was possible. Done now. Thanks!

cvsudheer108 commented 2 years ago

We are using JSLT for transforming an input JSON to another format and also sometimes to enrich the JSON with additional data. So far we have a few templates only, but we find it the best tool for JSON transformation so far. To add to it, we are using it along with Camel. Glad Camel has Integration with JSLT in-built.

prabjohns-atex commented 2 years ago

Hi We (www.atex.com) currently use JSLT in our Camel Library, injecting the templates dynamically per route. We have 3 additional functions, 2 of which are domain specific, but the third, a replace-all function which allows regex capture group string replacement.

digitalfiends commented 1 year ago

We're investigating JSLT for use with our legacy adapter solution that processes fixed-width format files using JRecord. The output of JRecord is JSON (via CobolToJson), which we've integrated into Camel as a streaming record iterator. We needed an easy way to transform from the record-specific JSON structure to our enterprise canonical JSON format. One requirement is that we didn't want to go the JSON->POJO->MapStruct->POJO->JSON route. We've investigated AtlasMap.io but found the editor and overall features to be limited. MapNeat seemed like a powerful alternative, but still required more coding than we wanted for simple mappings. I was poking around the Camel documentation and stumbled across JSLT, which I'd never seen before!

I've got a simple JSLT map working with our Camel legacy file processor and, so far, I'm quite satisfied. I've encountered a few issues (likely my lack of experience with JSLT), primarily around if/else statements but everything else seems quite straightforward. I did have a question though, which I've posted in the Discussions section.

Thanks again for this excellent project.

niksw7 commented 11 months ago

I was using jslt templates in java to map large json datasets to smaller subsets(kind of mapping without the need for pojo) Recently I moved out from java to golang. I was trying to find out it's implementation in golang,but none. Is there any alternative if folks can suggest