title: how to map a JSON to a java model class
body: <p>I need to map <code>JSON</code> obj to a class and its arrays to <code>ArrayList</code> in <code>Android</code> and it should have all the children data as well. (with nested arraylists too) and i need to convert updated data list again to <code>jsonobject</code></p>
  
  <p><strong>my json string is</strong></p>
  
  <pre><code>  {
      "type": "already_planted",
      "crops": [
        {
          "crop_id": 1,
          "crop_name": "apple",
          "crop_details": [
            {
              "created_id": "2017-01-17",
              "questions": [
                {
                  "plants": "10"
                },
                {
                  "planted_by": "A person"
                }
              ]
            },
            {
              "created_id": "2017-01-30",
              "questions": [
                {
                  "plants": "15"
                },
                {
                  "planted_by": "B person"
                }
              ]
            }
          ]
        },
        {
          "crop_id": 2,
          "crop_name": "Cashew",
          "crop_details": [
            {
              "created_id": "2017-01-17",
              "questions": [
                {
                  "plants": "11"
                },
                {
                  "planted_by": "c person"
                }
              ]
            }
          ]
        }
      ]
    }
  </code></pre>