Closed wbommel closed 6 months ago
In my case (localated in germany Locale.DE) using DecimalFormat("#.######") (in JsonPrettyPrinter.java) lead to the use of comma as decimal delimiter destroying the JSON like so: original --> with comma
DecimalFormat("#.######")
Easy fix was to use NumberFormat.getInstance(Locale.US) according to https://www.baeldung.com/java-8-localization so I created a pull-request for it.
NumberFormat.getInstance(Locale.US)
Not being "at home" in Java I cannot say if it might have side effects, so please take a closer look. ;-)
Good find, thanks! Fixed in #24; I used DecimalFormatSymbols to keep the same format, since NumberFormat.getInstance outputs fewer decimal places.
DecimalFormatSymbols
NumberFormat.getInstance
Perfect, thanks for fixing. :-)
In my case (localated in germany Locale.DE) using
DecimalFormat("#.######")
(in JsonPrettyPrinter.java) lead to the use of comma as decimal delimiter destroying the JSON like so: original --> with commaEasy fix was to use
NumberFormat.getInstance(Locale.US)
according to https://www.baeldung.com/java-8-localization so I created a pull-request for it.Not being "at home" in Java I cannot say if it might have side effects, so please take a closer look. ;-)