zoukankan      html  css  js  c++  java
  • 非标准JSON解析

    http://blog.csdn.net/superit401/article/details/51734591

    1. String category = "{'v-soft-list':[{typecode:'zhuanbi',gametype:'赚币',count:5},{typecode:'dongzuo',gametype:'动作',count:12},{typecode:'maoxian',gametype:'冒险',count:14},{typecode:'xiuxian',gametype:'休闲',count:61},{typecode:'zhili',gametype:'智力',count:17},{typecode:'gaoxiao',gametype:'搞笑',count:6},{typecode:'celue',gametype:'策略',count:4},{typecode:'qipai',gametype:'棋牌',count:2}]}";  
    2.           
    3.         JSONObject jsonObject = JSONObject.fromObject(category);    
    4.         JSONArray jsArray = jsonObject.getJSONArray("v-soft-list");    
    5.         for(int i=0;i<jsArray.size();i++){    
    6.            JSONObject jsObject = (JSONObject)jsArray.get(i);    
    7.            String typeCode = (String)jsObject.get("typecode");    
    8.            System.out.println(typeCode);    
    9.         }   
  • 相关阅读:
    Swift
    Swift
    Swift
    Swift
    Swift
    Swift
    Swift
    将Ojective-C代码移植转换为Swift代码
    Swift
    房费制——报表(1)
  • 原文地址:https://www.cnblogs.com/robbinluobo/p/6142782.html
Copyright © 2011-2022 走看看