I have an interface
public interace ABC {
}
Implementation of this is as follows:
public class XYZ implements ABC {
private Map<String, String> mapValue;
public void setMapValue( Map<String, String> mapValue) {
this.mapValue = mapValue;
}
public Map<String, String> getMapValue() {
return this.mapValue
}
}
I want to deserialize a class using Gson which is implemented as
public class UVW {
ABC abcObject;
}
when I try to deserialize it like gson.fromJson(jsonString, UVW.class);
it returns me null
. jsonString is UTF_8 String.
Is it because of interface used in UVW class? If yes, how do I deserialize such class?