-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The I-JSON option #80
Comments
@cyberphone Commented public class Dog {
public String name;
public int age;
public long ijsonlong; // Added test property
public boolean bitable;
} Updated demo program: dog.ijsonlong = 9223372036854775807l; // Largest long there is
JsonbConfig config = new JsonbConfig().withStrictIJSON(true);
Jsonb jsonb = JsonbBuilder.create(config);
String result = jsonb.toJson(dog);
System.out.println(result); Result: {"age":4,"bitable":false,"ijsonlong":9223372036854775807,"name":"Falco"} This is (as far as I can tell...) not compliant with I-JSON. |
@m0mus Commented
I see that the same should be done for long numbers and BigInteger when I-JSON support is switched on. These numbers should be serialized as strings and JSON-B implementations must be responsible for proper handling of it. |
@cyberphone Commented |
@rmannibucau Commented Important side note to avoid spec overlapping: serialization must NOT be handled by JSON-B but JSON-P here so it can be something to port to JSON-P attention. |
@cyberphone Commented |
@rmannibucau Commented |
|
Having an I-JSON option is great but since serialization of numbers outside of the IEEE-754 double precision universe isn't standardized it doesn't help that much:
OAI/OpenAPI-Specification#1519 (comment)
BTW, does the I-JSON option really address serialization of
long
? If it doesn't then it is not really I-JSON compliant.A list of things affected by the I-JSON option would be much appreciated.
The text was updated successfully, but these errors were encountered: