Home > Back-end >  What are the useful tools to parse the json string array as follows, hope can be parsed into a List
What are the useful tools to parse the json string array as follows, hope can be parsed into a List

Time:12-09

[{" sid ", "A0001", "sname" : "eldest brother", "sage", "11", "cid" : "101"}, {" sid ":" A0002 ", "sname" : "# 2", "sage" : "12", "cid" : "102"}, {" sid ":" A0003 ", "sname" : "old", "sage" : "13", "cid" : "103"}]


How to use this string of tools can help to List Well, thanks for your bosses

CodePudding user response:

List Maps=(List & gt;) JSONObject. Parse (s);

Fastjson turn

CodePudding user response:

 
String s="[{" sid \ ": " A0001 \ ", \ "sname " : \ "eldest brother ", \ "sage " : \ "and ", \ "cid " : \ "101 "}, {\ "sid " : \ "A0002 ", \ "sname " : \ "second ", \ "sage " : \ "12 ", \ "cid " : \ "102 "}, {\ "sid " : \ "A0003 ", \ "sname " : \ "old ", \ "sage " : \ "13 ", \ "cid " : \ "103 "}] "

List Maps=JSONObject. ParseArray (s, Map. The class).



Use of ali fastjson

Coordinate

Com. Alibaba
Fastjson
1.2.47 & lt;/version>
  • Related