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


##########
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:
   there are a few reasons
   
   * being symmetric and aligned on other numbers (parse/toString)
   * being potentially shorter for long occurences and save chars
   * being aligned on the number flavor
   
   but agree it is not crazy but also probably not worth it, no?



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