Skip to content

Instantly share code, notes, and snippets.

@marcosabel
Last active February 27, 2019 17:15
Show Gist options
  • Save marcosabel/a1865d979b1e872584ec22d774b17c9b to your computer and use it in GitHub Desktop.
Save marcosabel/a1865d979b1e872584ec22d774b17c9b to your computer and use it in GitHub Desktop.
import com.fasterxml.jackson.annotation.JsonValue;
public enum JacksonExampleEnum {
OPTION_1("0", "0"), OPTION_2("1", "1");
private String a;
private String b;
JacksonTestEnum(String a, String b) {
this.a = a;
this.b = b;
}
@JsonValue
public String getA() {
return a;
}
public String getB() {
return b;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment