Open
Description
Assume you have a Java class which has an Enum.
What happens if a JSON input contains a value for that Enum which is not a valid Enum value?
The only useful sentence I could find in the spec is
Deserialization of a JSON value into an enum instance MUST be done
by calling the enum’s valueOf(String) method.
And valueOf(String)
throws an IllegalArgumentException. Is this what is intended? Means should we blow up in that case with a JsonbException?
The other option would be to set the field to null
.