Skip to content

Commit

Permalink
Collection of POJOs are not deserialized correctly when it is a servi…
Browse files Browse the repository at this point in the history
…ce method parameter #77
  • Loading branch information
gorbunkov committed Nov 11, 2019
1 parent 3822a47 commit a60d28c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public Object toObject(Type type, String value, @Nullable String modelVersion) t
//if type argument for the collection is defined and is not entity, then do the basic deserialization
if (argumentTypeClass != null) {
if (!Entity.class.isAssignableFrom(argumentTypeClass)) {
return deserialize(value, clazz);
return deserialize(value, type);
}
}
//if type argument for the collection is defined and is entity or if there is no type argument then try to
Expand All @@ -118,8 +118,8 @@ public Object toObject(Type type, String value, @Nullable String modelVersion) t
return deserialize(value, clazz);
}

public Object deserialize(String json, Class clazz) {
return entitySerializationAPI.objectFromJson(json, clazz);
public Object deserialize(String json, Type type) {
return entitySerializationAPI.objectFromJson(json, type);
}

public String serialize(Object instance) {
Expand Down

0 comments on commit a60d28c

Please sign in to comment.