IBM / JSONata4Java

Open Source Java version of JSONata
Apache License 2.0
91 stars 38 forks source link

FYI: Different Java port of jsonata-js #275

Open wnm3 opened 1 year ago

wnm3 commented 1 year ago

I received this email today and wanted to inform this group of the work:

Dear Andrew and Nathan,

first of all we’d like to thank you guys for inventing Jsonata, we really love it and it’s a great fit to our Low Code platform!

Today we’re happy to release jsonata-java: https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_dashjoin_jsonata-2Djava&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=EYX3AEyQAwmdbWQyzpxSNg&m=BfBxUJe2_1afrlE5S6vRVP6THcp5kqviZYYTZ120GdFdSABXgPWJLG9ITr2_a18T&s=5F2biZ7k_fLQw0oXAaur51jGAcLkZlAHC2IlXcJWOMs&e=

jsonata-java is an Apache-licensed 1:1 Java port of the jsonata-js reference that stays as close to the original source structure as possible.

Why? We needed a Jsonata in the (Java) backend that behaves exactly like Jsonata in the frontend, 100% compatible, 100% reference test coverage(*), small and performant.

How? Wherever possible we used language constructs as close as possible to the Javascript ones: https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_dashjoin_jsonata-2Djava_blob_main_README.md-23design&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=EYX3AEyQAwmdbWQyzpxSNg&m=BfBxUJe2_1afrlE5S6vRVP6THcp5kqviZYYTZ120GdFdSABXgPWJLG9ITr2_a18T&s=ri1xfL7inFcg-Uduai27l_dECw9_eGNEoloteU8havM&e=

Also we decided to use no third party dependencies, so it can easily be used with any JSON lib (Jackson, Gson, …), and can also very easily be compiled as native executable (a CLI Jsonata like jq is on our laundry list - TBD)

It would be great to get your feedback and touch base. It would also be great to be listed as additional Jsonata implementation, is there a central Jsonata impl page?

Thanks in advance, and best regards,

Uli Walther and Andi Eberhart

(*) Well maybe 98%… out of the >1600 test cases there are around 30 described differences - most of them unsupported $toMillis etc features: https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_dashjoin_jsonata-2Djava_blob_main_test_test-2Doverrides.json&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=EYX3AEyQAwmdbWQyzpxSNg&m=BfBxUJe2_1afrlE5S6vRVP6THcp5kqviZYYTZ120GdFdSABXgPWJLG9ITr2_a18T&s=AHW6LXVE05rzcj_sQvGfUoVr1x1koxCi5EGkEa3TPvM&e=

To be honest to get to 100% test coverage was more work than expected (the last 20% nearly cost as much as the 80% before that, as is always the case…)

— Dashjoin GmbH Rapidly Build Data-Driven Apps https://urldefense.proofpoint.com/v2/url?u=https-3A__dashjoin.com&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=EYX3AEyQAwmdbWQyzpxSNg&m=BfBxUJe2_1afrlE5S6vRVP6THcp5kqviZYYTZ120GdFdSABXgPWJLG9ITr2_a18T&s=ibiFKl2V7JeRqRcPwYEURAqP3gvmWgAp2oUZBrPDf4w&e= <https://urldefense.proofpoint.com/v2/url?u=https-3A__dashjoin.com_&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=EYX3AEyQAwmdbWQyzpxSNg&m=BfBxUJe2_1afrlE5S6vRVP6THcp5kqviZYYTZ120GdFdSABXgPWJLG9ITr2_a18T&s=aDDfn6ecV3HibeyUxv-3l0PDD8okmU6j9R558HZkrCU&e= >

bluemel commented 1 year ago

OK... this sound interesting. We will test it

BR Martin

28.07.2023 20:40:09 Nathaniel Mills @.***>:

I received this email today and wanted to inform this group of the work:

Dear Andrew and Nathan,

first of all we’d like to thank you guys for inventing Jsonata, we really love it and it’s a great fit to our Low Code platform!

Today we’re happy to release jsonata-java: https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_dashjoin_jsonata-2Djava&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=EYX3AEyQAwmdbWQyzpxSNg&m=BfBxUJe2_1afrlE5S6vRVP6THcp5kqviZYYTZ120GdFdSABXgPWJLG9ITr2_a18T&s=5F2biZ7k_fLQw0oXAaur51jGAcLkZlAHC2IlXcJWOMs&e=

jsonata-java is an Apache-licensed 1:1 Java port of the jsonata-js reference that stays as close to the original source structure as possible.

Why? We needed a Jsonata in the (Java) backend that behaves exactly like Jsonata in the frontend, 100% compatible, 100% reference test coverage(*), small and performant.

How? Wherever possible we used language constructs as close as possible to the Javascript ones: https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_dashjoin_jsonata-2Djava_blob_main_README.md-23design&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=EYX3AEyQAwmdbWQyzpxSNg&m=BfBxUJe2_1afrlE5S6vRVP6THcp5kqviZYYTZ120GdFdSABXgPWJLG9ITr2_a18T&s=ri1xfL7inFcg-Uduai27l_dECw9_eGNEoloteU8havM&e=

Also we decided to use no third party dependencies, so it can easily be used with any JSON lib (Jackson, Gson, …), and can also very easily be compiled as native executable (a CLI Jsonata like jq is on our laundry list - TBD)

It would be great to get your feedback and touch base. It would also be great to be listed as additional Jsonata implementation, is there a central Jsonata impl page?

Thanks in advance, and best regards,

Uli Walther and Andi Eberhart

(*) Well maybe 98%… out of the >1600 test cases there are around 30 described differences - most of them unsupported $toMillis etc features: https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_dashjoin_jsonata-2Djava_blob_main_test_test-2Doverrides.json&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=EYX3AEyQAwmdbWQyzpxSNg&m=BfBxUJe2_1afrlE5S6vRVP6THcp5kqviZYYTZ120GdFdSABXgPWJLG9ITr2_a18T&s=AHW6LXVE05rzcj_sQvGfUoVr1x1koxCi5EGkEa3TPvM&e=

To be honest to get to 100% test coverage was more work than expected (the last 20% nearly cost as much as the 80% before that, as is always the case…)

— Dashjoin GmbH Rapidly Build Data-Driven Apps https://urldefense.proofpoint.com/v2/url?u=https-3A__dashjoin.com&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=EYX3AEyQAwmdbWQyzpxSNg&m=BfBxUJe2_1afrlE5S6vRVP6THcp5kqviZYYTZ120GdFdSABXgPWJLG9ITr2_a18T&s=ibiFKl2V7JeRqRcPwYEURAqP3gvmWgAp2oUZBrPDf4w&e= <https://urldefense.proofpoint.com/v2/url?u=https-3A__dashjoin.com_&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=EYX3AEyQAwmdbWQyzpxSNg&m=BfBxUJe2_1afrlE5S6vRVP6THcp5kqviZYYTZ120GdFdSABXgPWJLG9ITr2_a18T&s=aDDfn6ecV3HibeyUxv-3l0PDD8okmU6j9R558HZkrCU&e= >

— Reply to this email directly, view it on GitHub[https://github.com/IBM/JSONata4Java/issues/275], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AAJ3CV3CINJ755CZDO2J3ZTXSQBQPANCNFSM6AAAAAA233G3TA]. You are receiving this because you are subscribed to this thread.[Verfolgungsbild][https://github.com/notifications/beacon/AAJ3CVYWYH6SFXYUW6SWOQDXSQBQPA5CNFSM6AAAAAA233G3TCWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHGZZERNI.gif]