I am having some trouble trying to serialize/deserialize some `enum` in Java. Here is my enum class:

FrequencyType.java:

```
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public enum FrequencyType {
    NONE,
    HOURLY,
    DAILY,
    WEEKLY,
    MONTHLY;
}

```

Controller.java

```
@RequestMapping(method = RequestMethod.POST)
public Object createFrequency(@RequestBody FrequencyType frequencyType) throws Exception {
    ...
    frequencyManager.createFrequency(frequencyType);
    ...
}

```

I am trying to use the `createFrequency` method to take in a `FrequencyType` as `json` input. Here is an example of my input:

```
{
    "frequencyType": "HOURLY"
}

```

However, whenever I try to invoke this method via my REST API, I get an error saying:

> 
> "Could not read JSON: Can not deserialize instance of
>  com.zuora.cds.api.schedule.FrequencyType out of START\_OBJECT token\n
>  at [Source: java.io.PushbackInputStream@225337f8; line: 1, column: 1];
>  nested exception is
>  com.fasterxml.jackson.databind.JsonMappingException: Can not
>  deserialize instance of com.zuora.cds.api.schedule.FrequencyType out
>  of START\_OBJECT token\n at [Source:
>  java.io.PushbackInputStream@225337f8; line: 1, column: 1]",
> 
> 
> 

I have tried to add in the above `JsonInclude` and `JsonIgnoreProperties` annotationis but that doesn't seem to help. I also tried to add `getters` and `setters` like so:

```
FrequencyType getNone() {
    return FrequencyType.NONE;
}
FrequencyType getHourly() {
    return FrequencyType.HOURLY;
}
FrequencyType getDaily() {
    return FrequencyType.DAILY;
}
FrequencyType getWeekly() {
    return FrequencyType.WEEKLY;
}
FrequencyType getMonthly() {
    return FrequencyType.MONTHLY;
}
void setNone(FrequencyType frequencyType) {
    this.equals(frequencyType);
}
void setHourly(FrequencyType frequencyType) {
    this.equals(frequencyType);
}
void setDaily(FrequencyType frequencyType) {
    this.equals(frequencyType);
}
void setWeekly(FrequencyType frequencyType) {
    this.equals(frequencyType);
}
void setMonthly(FrequencyType frequencyType) {
    this.equals(frequencyType);
}

```

so that the POJO representation would hopefully transform the JSON into a `FrequencyType` but I end up getting the same error. Any help would be appreciated. Thanks!