Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这里的问题是,在转换为 json 对象十进制值时会被截断。我在下面的代码中使用 Json-lib。
String str = "{'key':'key','type':'string','value':9276658.1}"; JSONObject fromObject = JSONObject.fromObject(str); // sysout -> output {"key":"key","type":"string","value":9276658}
如何解决这个问题?