Funz / funz-core

Funz commons
BSD 2-Clause "Simplified" License
0 stars 2 forks source link

export output data in true json format #3

Open yannrichet opened 3 years ago

yannrichet commented 3 years ago

Fix x1= [.1,2,3] in "x1":[0.1,2,3]

yannrichet commented 3 years ago

https://github.com/Funz/funz-core/blob/01441fc9f21fb4e8f7fa0755bfcd868de7f8e564/src/main/java/org/funz/util/Data.java#L116

to avoid ".5", and force "0.5", something like:

DecimalFormat formatter = new DecimalFormat("#0.0#"); double d = 0.50; System.out.println(formatter.format(d));