eclipse-ee4j / eclipse-ee4j/jersey
enum should be serialized with name and not default toString
Open
- Dominant language
- Java
- Stars
- 730
- Forks
- 382
- PR merge metrics
- No merged PRs in 30d
Description
`org.glassfish.jersey.client.proxy.WebResourceFactory.invoke(Object, Method, Object[]) ` uses the value as is, which defaults to using the `toString()` method which causes issues with enums when the `toString()` does not return the same value as the `name()`
This forces implementation to provide a `public static fromString(String x)` method.
Jersey Version: jersey-proxy-client-2.38.jar
Would it be possible to use the `name()` instead if the Class of the given value is an enum?
Contributor guide
Assessment
This issue has not been assessed yet.