Terracotta-OSS / terracotta-platform

http://terracotta.org
Apache License 2.0
32 stars 48 forks source link

Jackson => Gson (2/2) #1183

Closed mathieucarbou closed 1 year ago

mathieucarbou commented 1 year ago

This PR:

  1. removes Jackson from platform and uses Gson instead.
  2. Removes any Json-related code from these modules:
    • Nomad
    • Sanskrit
    • iNet
    • Struct
    • DC model
    • DC API
    • DC Server API

No change in the communication format, test ran against a previous platform kit using Jackson.

Some important notes:

All these missing features had to be added. So a lot of code was written to cope with missing Gson features, and also allow class loading and unknown type deserialisation, through a mechanism where we only specify the type names we allow for security reasons.

Gson is really easy to use. The *Module classes in different modules are stripped down compared to Jackson ones and writing custom type adapters is easier too.

mathieucarbou commented 1 year ago

moving to draft - refactoring of how the GsonModule works internally.