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