我有一个JSONString:
<i>{1={"id":"1","description":"Red","Objects":{"doors":4,"number":4},"life":100}}</i>
如何将此 JSONString 放入哈希图中JSONSimple
?
此代码来自 JSON-simple 的 wiki 页面http://code.google.com/p/json-simple/wiki/DecodingExamples#Example_1_-_Convenient_way:_Use_JSONValue
String s="[{1={"id":"1","description":"Red","Objects": {"doors":4,"number":4},"life":100}}]";
Object obj=JSONValue.parse(s);
JSONArray array=(JSONArray)obj;