rmannibucau commented on code in PR #134:
URL: https://github.com/apache/johnzon/pull/134#discussion_r2984375047


##########
johnzon-mapper/src/main/java/org/apache/johnzon/mapper/converter/BigDecimalConverter.java:
##########
@@ -25,7 +25,9 @@
 public class BigDecimalConverter implements Converter<BigDecimal> {
     @Override
     public String toString(final BigDecimal instance) {
-        return instance.toString();
+        // when using the converter, user expects the decimal notation
+        // otherwise, JsonNumber will give the E (scientific) notation
+        return instance.toPlainString();

Review Comment:
   hmm, this one was expected originally
   i'm not more 100% sure but think the length of the value can be too wide (no 
more sure if IEEE 754 or nother spec) and therefore not portable accross 
parsers whereas scientific notation was more portable
   can be sane to keep the default in mapper (same for the toggles, no reason 
to break mapper for JSON-B there)



-- 
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]

Reply via email to