Skip to content

JacksonOnAndroid

Tatu Saloranta edited this page Jan 29, 2017 · 14 revisions

This page contains information on various aspects of usage that are specific to Android platform

ProGuard

While there are no standardized settings for ProGuard usage, users have contributed sample settings that may be of use. We are happy to accept more suggestions.

Here is one by @johnjohndoe:

# Jackson
-keep @com.fasterxml.jackson.annotation.JsonIgnoreProperties class * { *; }
-keep class com.fasterxml.** { *; }
-keep class org.codehaus.** { *; }
-keepnames class com.fasterxml.jackson.** { *; }
-keepclassmembers public final enum com.fasterxml.jackson.annotation.JsonAutoDetect$Visibility { 
    public static final com.fasterxml.jackson.annotation.JsonAutoDetect$Visibility *;
}

# General
-keepattributes SourceFile,LineNumberTable,*Annotation*,EnclosingMethod,Signature,Exceptions,InnerClasses