简体   繁体   中英

parse simple-JSONObject in JSONObject

i want to simple parse it to jsonObject . the resone way is this i just want to manage order of the object

    try {
        { JSONParser parser = new JSONParser();                 
  ContainerFactory containerFactory = new ContainerFactory(){
    public List creatArrayContainer() {                       
return new LinkedList();   }
       public Map createObjectContainer() {             
          return new LinkedHashMap();    }    };
   json = (JSONObject)parser.parse(responce, containerFactory);

this is link where my question is im using simple jsonObject

Better use Jackson to simplify your work....

See this link:

http://jackson.codehaus.org/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM