Closed mathieucarbou closed 1 year ago
(rebased)
This refactoring is a first step required to switch to Gson, but also anyway a good refactoring to have in order to isolate Jackson from our code and reduce the direct dependencies we have on it.
- Introduced Terracotta Json API (currently implemented by Jackson)
Isolate Jackson classes from Terracotta code:
- no direct imports anymore
- The use of Jackson specific mixins and such are isolated in a
*.json
package- Refactored Sanskrit to get rid of its coupling with Jackson classes
- Added a Workaround in NomadChange json serialisation due to a bug in how Jackson is handling polymorphism serialisation
@mathieucarbou When moving to some other json library then mixin present in *.json package in all the affected modules will still need to be changed right ?
This refactoring is a first step required to switch to Gson, but also anyway a good refactoring to have in order to isolate Jackson from our code and reduce the direct dependencies we have on it.
- Introduced Terracotta Json API (currently implemented by Jackson)
Isolate Jackson classes from Terracotta code:
- no direct imports anymore
- The use of Jackson specific mixins and such are isolated in a
*.json
package- Refactored Sanskrit to get rid of its coupling with Jackson classes
- Added a Workaround in NomadChange json serialisation due to a bug in how Jackson is handling polymorphism serialisation
@mathieucarbou When moving to some other json library then mixin present in *.json package in all the affected modules will still need to be changed right ?
Yes! This PR is just isolating all the TC code from Jackson. Currently in platform all the Jackson imports are everywhere. TC code is tightly coupled with Jackson.
This PR (1/2) is a first step: it isolates jackson imports in:
Then, when converting to Gson, only rewriting those impl will be required because all the TC code now depends on the new TC Json API I introduced here.
Next PR (2/2) will switch the Json Factory impl and these mpdules to Gson.
(rebased)
This refactoring is a first step required to switch to Gson, but also anyway a good refactoring to have in order to isolate Jackson from our code and reduce the direct dependencies we have on it.
*.json
package