Skip to content

Instantly share code, notes, and snippets.

Last active Apr 10, 2018
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 {
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