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
When a class contains a field with a vavr interface type, e.g. Map, Gson can't deserialize it, as it needs a certain implementation of Map. Often a particular implementation (like HashMap) would be a good default for the majority of classes, so one could just register a TypeHierarchyAdapter using a HashMap to deserialize a Map field. Such TypeHierarchyAdapters could be part of the library (but not registered in VavrGson, just as additional helpers).
The text was updated successfully, but these errors were encountered:
Hi @DanielGronau and @ruslansennov , I would like to help on this issue. I created a simple test case trying to reproduce, but the test passed. So both serialization and deserialization works.
When a class contains a field with a vavr interface type, e.g.
Map
, Gson can't deserialize it, as it needs a certain implementation ofMap
. Often a particular implementation (likeHashMap
) would be a good default for the majority of classes, so one could just register aTypeHierarchyAdapter
using aHashMap
to deserialize aMap
field. SuchTypeHierarchyAdapter
s could be part of the library (but not registered inVavrGson
, just as additional helpers).The text was updated successfully, but these errors were encountered: