Architecture #18879


Test zio-json in place of lift-json

Added by François ARMAND about 3 years ago. Updated over 2 years ago.

Architecture - Code maintenance
Target version:
Effort required:
Name check:
To do
Fix check:
To do


We want to have a path out of lift-json for the following reasons:

- lift-json is slow, which is becoming a blocker for some parts (like expected reports / compliance in postgres)
- lift-json comes with 10Mo of dependencies that are not used anywhere else,
- lift-json is not maintained anymore (at all).

We have already tested circe in some other projects (like CVE) and we found that:

- it's a bit hard to use / understand,
- performance are deceptive in memory consumption (the speed was much better then lift-json)
- compilation time exploses,
- the chan/community was not very supportive.

We want to try zio-json which is extremelly alike circe on most part (similar - so hard - to use, mapping to business objects, etc) but it makes things better on several point:

- compilation time is extremelly good,
- performance are the best on available json framework for scala - including for memory consumption,
- its implementation is order of magnitude simpler (the lexer is the most complexed part, but it's not very interesting, and appart from that, it's a couple hundred lines of code) and so, it's possible to just look and undertand what is happening and twick it
- the chan was very helpful and friendly (but it's perhaps because that project is quite new).

But there is also risks:

- the project is extremelly young (even if tests are extensive, may have bug ; not so many users ; etc)
- there is no intermediate AST, which is disturbing,

So, the idea is to port one API (for example Rule) to see from end to end what it can be to use zio-json, check that there is no blockers, check if it makes things simpler or not, the quantity of work to do, etc. Plus, having zio-json in the code with a full, not toy example, would make it much simpler to use/repeat iteratively.

Subtasks 2 (0 open2 closed)

Architecture #19340: Parent ticket brokes technique version testsReleasedVincent MEMBRÉActions
Architecture #19345: Since we forbid chars in technique version, we actually have to not use themReleasedVincent MEMBRÉActions

Related issues 1 (1 open0 closed)

Related to Rudder - Architecture #23677: Migrate to zio-jsonNewClark ANDRIANASOLOActions

Also available in: Atom PDF