lost decimals when json deserialization use Gson
public class GsonTest { class A { Float v; } public static void main(String[] args) { Gson gson = new Gson(); String aStr = “{ v:2752293.58 }”; A a = gson.fromJson(aStr, A.class); System.out.println(a.v); } } the result will be: 2752293.5 not the expected value: 2752293.58 anyone have the same problem? gson 1
lost decimals when json deserialization use Gson
public class GsonTest { class A { Float v; } public static void main(String[] args) { Gson gson = new Gson(); String aStr = “{ v:2752293.58 }”; A a = gson.fromJson(aStr, A.class); System.out.println(a.v); } } the result will be: 2752293.5 not the expected value: 2752293.58 anyone have the same problem? gson 1
How can I use Gson to unmarshal json into different class instances when data is a string-value map?
A brokerage is returning data from a GET for the query “MSFT,AAPL,XYZZ”: