Create a gist now

Instantly share code, notes, and snippets.

@tassioauad /Property.java Secret
Last active Apr 10, 2018

Embed
What would you like to do?
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;
}
}
{"type": 0}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment