如何构造JSONarray

 public static JSONArray TcDishitems (){
         JSONObject item = null;
         JSONArray  itemarry = new JSONArray() ;
         try{
      item.put( "ID", Share. operatorId)
          .put( "number", "")
          .put( "name", tcdish. ScombXDish_Dish_Name)
          .put( "tzs", "")
          .put( "addTime", "")
           ;
                itemarry.put(item);
               } catch(JSONException e){
                     e.printStackTrace();    
               }     
           return itemarry;
   }    


 

你可能感兴趣的:(如何构造JSONarray)