-
Notifications
You must be signed in to change notification settings - Fork 105
Open
Labels
bugSomething isn't working rightSomething isn't working right
Description
Describe the bug
Deserialization in Yasson 3 is no more strict.
If I have a class with a long value and on the json, there is a double value, where deserializing the content, there is no more exception and the double value is truncated into the long variable.
To Reproduce
public class MyClass {
private Long lid;
}
JsonbConfig config = new JsonbConfig().withFormatting(true).withStrictIJSON(true);
Jsonb jsonb = JsonbBuilder.create(config);
String json= "{ lid\":1254.5 }";
myInstance = jsonb.fromJson(json, MyClass.class);
Assert.fail("1254.5 Should not be allowed on lid - Long attribute");
Expected behavior
Having a JsonbException thrown
System information:
- OS: Windows
- Java Version: 17
- Yasson Version: 3.0.4
Additional context
Happened when migrating from wilffly 26.1.3 to wildfly 35.0.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't working rightSomething isn't working right