Skip to content

Instantly share code, notes, and snippets.

@tassioauad
Last active April 10, 2018 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tassioauad/785e1132613f992f1cfc243f15725e5a to your computer and use it in GitHub Desktop.
Save tassioauad/785e1132613f992f1cfc243f15725e5a to your computer and use it in GitHub Desktop.
Json format of enum
public class Property {
private PropertyType type;
@JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT)
public PropertyType getType() {
return type;
}
}
public enum PropertyType {
SYSTEM_PROPERTY(0), SYSTEM_ENVYRONMENT(1) ,APPLICATION_CONFIGURATION(2);
private int value;
PropertyType(int value) {
this.value = value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment