title: Making JSONObject parcelable
body: <p>I have an array list of JSON Objects that I'm trying to pass like so. </p>
  
  <pre><code>ArrayList&lt;JSONObject&gt; entryCities = new ArrayList&lt;&gt;();
  
  for(int i = 0; i &lt; entries.length(); i++){
  
      entryCities.add(entries.getJSONObject(i));
  
  }
  
  Intent intent = new Intent(UnitedStatesActivity.this, StateActivity.class);
  intent.putExtra("object", entryCities);
  startActivity(intent);
  </code></pre>
  
  <p>I know this doesn't work and that I need to make my array, or the JSON Object in the array parcelable. I started looking at the documentation and have come up with this class that I am wanting to pass the <code>ArrayList&lt;JSONObject&gt;</code> into, but I'm not sure what I'm supposed to be adding in my <code>writeToParcel()</code> method. </p>
  
  <p>Am I writing out the specific values of the JSON Object I want to pull? i.e.
  <code>out.object.getString("string")</code> and then passing my parcelable object on to the next activity? I'm just not sure what the content of the method should be in the context of making JSON Objects parcelable.</p>
  
  <p>public class StateParcelable extends JSONObject implements Parcelable {</p>
  
  <pre><code>ArrayList&lt;JSONObject&gt; list;
  
  
  public StateParcelable(ArrayList&lt;JSONObject&gt; list){
      this. list = list;
  }
  
  public void writeToParcel(Parcel out, int flags) {
  
  }
  
  public int describeContents(){
      return 0;
  }
  
  public static final Parcelable.Creator&lt;StateParcelable&gt; CREATOR
          = new Parcelable.Creator&lt;StateParcelable&gt;() {
      public StateParcelable createFromParcel(Parcel in) {
          return new StateParcelable(in);
      }
  
      public StateParcelable[] newArray(int size) {
          return new StateParcelable[size];
      }
  };
  
  private StateParcelable(Parcel in) {
  
  }
  </code></pre>