jakartaee / jakartaee/jsonb-api
Revise big number support (Section 3.16 of JSON-B spec)
- Dominant language
- Java
- Stars
- 95
- Forks
- 41
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 35
Description
Hi!
We got an interesting case from a user over in Apache Johnzon.
https://issues.apache.org/jira/browse/JOHNZON-177
They basically have a POJO which has an int field. But the sent JSON is actually longer than Integer.MAX_VALUE. Currently Johnzon kind of silently ignores this and just cuts off the value, which leads to a totally different number than sent.
The same would happen for an Integer field of course.
Note that ijson rules also do not apply as the number which get sent is smaller than the maximal possible JsonNumber (basically Long.MAX_VALUE iirc).
Shouldn't this yield an Exception? And which one?
Or should we kind of enhance the ijson rules and only blow up if strict-ijson is activated?
Contributor guide
Research direction
Begin with Section 3.16 of the JSON-B specification and the linked Apache Johnzon issue, JOHNZON-177; compare the described overflow behavior with the current API contract. Done means reaching an explicit decision about exception and strict-ijson behavior and recording the resulting specification or API change, with tests identified after the decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100