title: How to convert JSONArray to ArrayList?
body: <p>It took me two days to think about this issue, but failed to resolve.
  So please help.</p>
  
  <p>Here is my json model</p>
  
  <pre><code>{
    "order_room_number": "string",
    "order_breakfast": "string",
    "room_type_name": "string",
    "order_number": "string",
    "hotel_id": 0,
    "order_check_in_time": "2017-03-09T10:56:09.343Z",
    "order_price": "string",
    "hotel_addres": "string",
    "order_check_out_time": "2017-03-09T10:56:09.343Z",
    "hotel_name": "string",
    "order_phone": "string",
    "order_transactionid": "string",
    "order_date": "2017-03-09T10:56:09.343Z",
    "user_id": 0,
    "order_people_number": 0,
    "order_id": 0,
    "order_state": "string",
    "order_number_of_room": 0,
    "orderUserList": [
      {
        "order_user_id": 0,
        "order_user_name": "string",
        "order_user_phone": "string",
        "order_id": 0,
        "order_user_id_number": "string"
      }
    ]
  }
  </code></pre>
  
  <p>Here is my json which i need to convert it to ArrayList</p>
  
  <pre><code>{
    "status": 200,
    "msg": "OK",
    "data": [
      {
        "order_id": 12,
        "order_number": null,
        "order_transactionid": "9",
        "order_date": null,
        "order_check_in_time": 1488680530000,
        "order_check_out_time": 1488680530000,
        "order_breakfast": null,
        "order_number_of_room": null,
        "order_room_number": null,
        "order_people_number": null,
        "order_phone": null,
        "order_price": "9",
        "order_state": "1",
        "room_type_name": null,
        "hotel_name": null,
        "hotel_addres": null,
        "hotel_id": null,
        "user_id": null,
        "orderUserList": null
      }
    ]
  }
  </code></pre>
  
  <p>Here is my model</p>
  
  <pre><code>package com.example.wecheatpaydemo.Model;
  
  /**
   * 
   *
   * @Explain:
   */
  
  public class OrderUser {
  
  
      private Long order_user_id;             // 用户实名制里面的姓名
      private String order_user_name;         // 用户实名制里面的姓名
      private String order_user_phone;        // 用户的手机号，用作登录账号
      private String order_user_id_number;    // 用户身份证号码
      private String order_id;                // 订单表外键
  
      public Long getOrder_user_id() {
          return order_user_id;
      }
  
      public void setOrder_user_id(Long order_user_id) {
          this.order_user_id = order_user_id;
      }
  
      public String getOrder_user_name() {
          return order_user_name;
      }
  
      public void setOrder_user_name(String order_user_name) {
          this.order_user_name = order_user_name;
      }
  
      public String getOrder_user_phone() {
          return order_user_phone;
      }
  
      public void setOrder_user_phone(String order_user_phone) {
          this.order_user_phone = order_user_phone;
      }
  
      public String getOrder_user_id_number() {
          return order_user_id_number;
      }
  
      public void setOrder_user_id_number(String order_user_id_number) {
          this.order_user_id_number = order_user_id_number;
      }
  
      public String getOrder_id() {
          return order_id;
      }
  
      public void setOrder_id(String order_id) {
          this.order_id = order_id;
      }
  
      @Override
      public String toString() {
          return "OrderUser{" +
                  "order_user_id=" + order_user_id +
                  ", order_user_name='" + order_user_name + '\'' +
                  ", order_user_phone='" + order_user_phone + '\'' +
                  ", order_user_id_number='" + order_user_id_number + '\'' +
                  ", order_id='" + order_id + '\'' +
                  '}';
      }
  
      public OrderUser(Long order_user_id, String order_user_name, String order_user_phone, String order_user_id_number, String order_id) {
          this.order_user_id = order_user_id;
          this.order_user_name = order_user_name;
          this.order_user_phone = order_user_phone;
          this.order_user_id_number = order_user_id_number;
          this.order_id = order_id;
      }
  
      public OrderUser() {
      }
  
  }
  </code></pre>
  
  <p>Here is my Fragment</p>
  
  <pre><code>public class ListChoiceone extends Fragment {
      private RecyclerView recyclerView;
      private List&lt;Order&gt; listBean;
      private RecyclerAdapter adapter;
      private String url = "http://jm/user/order/getNPayedOrders?user_id=9";
  
  
      public ListChoiceone() {
          // Required empty public constructor
      }
  
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          // Inflate the layout for this fragment
  
          View view = inflater.inflate(R.layout.fragment_list_choiceone, container, false);
  
          LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());
          recyclerView = (RecyclerView) view.findViewById(R.id.my_recycler_view);
          initData();
          adapter = new RecyclerAdapter(listBean, getActivity());
          recyclerView.setHasFixedSize(true);
          recyclerView.setLayoutManager(layoutManager);
          recyclerView.setAdapter(adapter);
          sendRequestWithHttpClicent();
  
          return view;
  
  
      }
  
      private void sendRequestWithHttpClicent() {
          new Thread(new Runnable() {
              @Override
              public void run() {
                  try {
                      OkHttpClient client = new OkHttpClient();
                      Request request = new Request.Builder()
                              .url(url)
                              .build();
                      Response response = client.newCall(request).execute();
                      String responseData = response.body().string();
                      parseJSONWithJSONObject(responseData);
  
                  } catch (IOException e) {
                      e.printStackTrace();
                  }
              }
          }).start();
      }
  
      private void parseJSONWithJSONObject(String jsonData) {
          try {
              JSONObject jsonObject = new JSONObject(jsonData);
              String status = jsonObject.getString("status");
              String msg = jsonObject.getString("msg");
  
              JSONArray jsonArray = jsonObject.getJSONArray("data");
              for (int i = 0; i &lt; jsonArray.length(); i++) {
                  JSONObject json = jsonArray.getJSONObject(i);
                  int order_id = json.getInt("order_id");
  
                  String order_number = json.getString("order_number");
                  String order_transactionid = json.getString("order_transactionid");
                  String order_phone = json.getString("order_phone");
                  String order_state = json.getString("order_state");
                  String order_check_in_time = json.getString("order_check_in_time");
                  String order_check_out_time = json.getString("order_check_out_time");
                  String order_price = json.getString("order_price");
                  String hotel_name = json.getString("hotel_name");
                  String hotel_addres = json.getString("hotel_addres");
                  String order_room_number = json.getString("order_room_number");
                  String room_type_name = json.getString("room_type_name");
  
                  int hotel_id = json.getInt("hotel_id");
                  int user_id = json.getInt("user_id");
  
                  JSONArray jsonArrayOrder = json.getJSONArray("orderUserList");
                  ArrayList&lt;OrderUser&gt; listOrderUser = new ArrayList&lt;OrderUser&gt;();
  
  
                  Log.i("nige", order_state);
  
              }
  
          } catch (JSONException e) {
              e.printStackTrace();
          }
      }
  
      private void initData() {
          listBean = new ArrayList&lt;&gt;();
  
  
  
      }
  
  }
  </code></pre>
  
  <p>Thank you so much my coder friends！</p>