Class com.fasterxml.jackson.annotation.SimpleObjectIdResolver has no default (no arg) constructor

99 views
Skip to first unread message

Monarch I

unread,
Dec 20, 2023, 2:22:56 PM12/20/23
to jackson-user

Hello, I'm getting error in deserialize JSON content from given JSON content String.
It's working with Build apk but not working in signed apk.
Current code had been working in AGP 4.0.2 but after updating it to 8.2.0,it is not working and throwing an error.

I'm using below dependencies:

implementation 'com.fasterxml.jackson.core:jackson-core:2.12.5'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.12.5'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.5'

Code:

String mapdata = readMapFile(); //this function returns string of json file.
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.enable(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT);
objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
MapGraph mapGraph = objectMapper.readValue(mapdata, MapGraph.class);

ProGuard rules: 

-keepattributes SourceFile,LineNumberTable
-keepclassmembers class * {
@com.fasterxml.jackson.annotation.JsonCreator *;
@com.fasterxml.jackson.annotation.JsonProperty *;
}
-keepnames class * { *; }
Reply all
Reply to author
Forward
0 new messages