-
-
Save tassioauad/785e1132613f992f1cfc243f15725e5a to your computer and use it in GitHub Desktop.
Json format of enum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Property { | |
private PropertyType type; | |
@JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT) | |
public PropertyType getType() { | |
return type; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum PropertyType { | |
SYSTEM_PROPERTY(0), SYSTEM_ENVYRONMENT(1) ,APPLICATION_CONFIGURATION(2); | |
private int value; | |
PropertyType(int value) { | |
this.value = value; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"type": 0} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment