You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Animal dog = new Dog();
Gson gson = new Gson();
String json = gson.toJson(dog); // Loses type info
Animal animal = gson.fromJson(json, Animal.class); // Deserializes to Animal only, no Dog
Performance
Jackson is faster for both serialization & deserialization esp for larger and nested payloads.
I would like to propose replacing Gson with Jackson as the default implementation or providing a first-party JacksonDataConverter alongside the existing Gson one, with an easy way for developers to plug it in.
Happy to contribute a PR if this sounds acceptable.
The text was updated successfully, but these errors were encountered:
Currently gson is being used in JsonDataConverter https://github.com/cadence-workflow/cadence-java-client/blob/master/src/main/java/com/uber/cadence/converter/JsonDataConverter.java. Gson has many limitations like:
ex.
ex.
Jackson is faster for both serialization & deserialization esp for larger and nested payloads.
I would like to propose replacing Gson with Jackson as the default implementation or providing a first-party JacksonDataConverter alongside the existing Gson one, with an easy way for developers to plug it in.
Happy to contribute a PR if this sounds acceptable.
The text was updated successfully, but these errors were encountered: