我想将一个字符串转换为JSONObject。以下是样例代码。
String str = "{"time": 1449838598.0999202, "Label": "Shirt", "Price": 52}";
JSONObject obj = new JSONObject(str);
但是转换后,时间变为1.4498385980999203E9。非常感谢任何帮助。
String str = "{\"time\": 1449838598.0999202, \"Label\": \"Shirt\", \"Price\": 52}";
- Menelaos Kotsollaris