Open aguibert opened 5 years ago
Currently the JSON-B TCK tests that EnumMap/EnumSet do NOT work, which I believe is an invalid test and JSON-B should in fact be required to support it.
TCK issue: https://github.com/eclipse-ee4j/jakartaee-tck/issues/103
The classes
java.util.EnumSet
andjava.util.EnumMap
are part of the JDK and could be supported by JSON-B.EnumSet should certainly be supported because JSON-B already support collections of POJOs, and EnumSet only doesn't work because it doesn't have any standard constructors.
EnumMap could also be considered. Technically JSON-B currently only supports
java.lang.String
keys, but Enums are quite easy to translate to/from String values. This could also potentially expand into a larger effort to support "stringable" keys as defined by Section 3.2 of the JAX-RS 2.1 spec: