rmannibucau commented on code in PR #134:
URL: https://github.com/apache/johnzon/pull/134#discussion_r2986537032
##########
johnzon-mapper/src/main/java/org/apache/johnzon/mapper/map/LazyConverterMap.java:
##########
@@ -85,8 +85,8 @@ public Object from(final Object a) {
private boolean useShortISO8601Format = true;
private DateTimeFormatter dateTimeFormatter;
- private boolean useBigIntegerStringAdapter = true;
- private boolean useBigDecimalStringAdapter = true;
+ private boolean useBigIntegerStringAdapter = false; // Jakarta JSON-B 3.0
Section 3.4.1 (BigDecimal MUST be a JSON number)
Review Comment:
For the record it got broken in johnzon 1.2.21, before it was working as
expected and as set in the code (string).
JSON-B intoduced this broken behavior (likely trying to get JSON-B compliant
since they broke themselves) to consider BigDeciman a numbers (which makes it
literally not interoperable with JS for example and some other parsers) and
totally inconsistent with I-JSON support of the spec, but johnzon-mapper should
keep its default (string) which is the only portable way to handle big numbers
since they cant be parsed by common numbers (even on 64 bits systems).
So you didn't break it in this PR but it got broken 2 years ago to make it
epxlicit.
So your system property is a good compromise to make both cases workable
without a code review since it can break easily in prod (we rarely test real
"Big" ranges in unit tests)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]