Azure / Azure/azure-documentdb-java

JsonSerializable doesn't support Enum

Open
#103 2 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.