Azure / Azure/azure-documentdb-java
JsonSerializable doesn't support Enum
Open
- Dominant language
- Java
- Stars
- 51
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Description
Consider an Enum like
`Enum Weekday {
MONDAY, TUESDAY, WEDNESDAY ...
}`
`new JSONObject(this.getMapper().writeValueAsString(value))` will throw JSONException. I know it is a generic exception when instantiate a JSONObject like new JSONObject("WEDNESDAY"), but maybe worthwhile put into consideration how to handle this situation?
Thanks,
Robbie
Contributor guide
Assessment
This issue has not been assessed yet.