dataverse icon indicating copy to clipboard operation
dataverse copied to clipboard

Remove Gson, Jackson and Everit JSON Schema Validation code dependencies

Open poikilotherm opened this issue 5 years ago • 5 comments

A lot of places in the code base use the Gson or Jackson library to do JSON processing (and a bit of data binding).

These should be refactored to use Java EE JSON-P (around since EE7) and JSON-B instead, making the code base using more standards and lowering no of deps.

This is related to #4260

poikilotherm avatar Apr 10 '20 14:04 poikilotherm

Related: Increasingly slow feedback loop for developers, increasingly large WAR files #5593

pdurbin avatar Apr 10 '20 14:04 pdurbin

Lately, I came back to look into #6694 now that we are on Payara 5 and can use Jakarta JSON-B standard now. This issue should be done before.

This refactoring should cleanup the direct dependency on org.everit.json.schema, too. A good replacement would be leadpony/justify, as it uses Jakarta EE APIs only and doesn't introduce the dependencies again transitively. The outdated libs where discussed in #7218/#7248, too.

Will adapt the title accordingly.

poikilotherm avatar Sep 11 '20 10:09 poikilotherm

I gave this issue a shout out today: https://iqss.slack.com/archives/C010LA04BCG/p1697654377221549?thread_ts=1697642617.029569&cid=C010LA04BCG

pdurbin avatar Oct 18 '23 18:10 pdurbin

@poikilotherm in Zulip, I just saw you write this:

"I can't help it: I think we need to get rid of the JsonPrinter/JsonReader classes, as described in #6810"

I thought this issue was mostly about removing the dependencies on third-party JSON libraries (Gson, Jackson, etc.) when we already have one that comes with Jakarta EE.

It's also about removing the JsonPrinter/JsonReader classes? Should that be a separate issue?

pdurbin avatar Mar 25 '24 18:03 pdurbin

Yeah, it might be it's own issue to split the tasks. On the other hand it is very often not easy to distinguish between these things, as there are code places where a few of the techs plus our own things mix and match.

poikilotherm avatar Mar 25 '24 19:03 poikilotherm

To focus on the most important features and bugs, we are closing issues created before 2020 (version 5.0) that are not new feature requests with the label 'Type: Feature'.

If you created this issue and you feel the team should revisit this decision, please reopen the issue and leave a comment.

cmbz avatar Aug 20 '24 15:08 cmbz

I'm reviewing #10739 and actively suggesting we not dig ourselves in deeper with Gson. Let's use the platform we build on (Jakarta EE) instead. In short, I agree with @poikilotherm so I'll reopen this issue.

pdurbin avatar Nov 12 '24 19:11 pdurbin