title: How to pase local JSON and populate a RecyclerView?
body: <p>I'm confused about how to parse local Json. I tried alot, but I can't find a solution.<br>
  I want to populate an ArrayList which contains just a simple title - I want to add that tite from JSON to a RecylerView. </p>
  
  <pre><code>{
      "hollywood": [{
          "_id": "58d3264f93f24d2bc87bebf5",
          "title": "sagar rana",
          "image": "encrypted-tbn1.gstatic.com/...",
          "genre": "hollywood",
          "description": "This for only demo purpose",
          "release": 2010,
          "download": "No download",
          "youtube": "youtube.com/embed/C-5EOd8xavw...",
          "__v ": 0,
          "upload ": "2017-03-23T01:35:11.182Z"
      }]
  }
  </code></pre>
  
  <p>MainActivty.java</p>
  
  <pre><code>import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.support.v7.widget.LinearLayoutManager;
  import android.support.v7.widget.RecyclerView;
  import android.util.Log;
  
  import org.json.JSONArray;
  import org.json.JSONException;
  import org.json.JSONObject;
  
  import java.io.IOException;
  import java.io.InputStream;
  import java.util.ArrayList;
  import java.util.HashMap;
  
  import static android.R.attr.data;
  
  public class MainActivity extends AppCompatActivity {
      RecyclerView recyclerView;
      MyAdapter recycleradapter;
      private ArrayList&lt;Moviedemo&gt; mArrayList;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          try {
              JSONObject obj = new JSONObject(loadJSONFromAsset());
              JSONArray m_jArry = obj.getJSONArray("hollywood");
              ArrayList&lt;HashMap&lt;String, String&gt;&gt; formList = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
              HashMap&lt;String, String&gt; m_li;
  
              for (int i = 0; i &lt; m_jArry.length(); i++) {
                  JSONObject jo_inside = m_jArry.getJSONObject(i);
                  Log.d("Details--&gt;", jo_inside.getString("hollywood"));
                  String formula_value = jo_inside.getString("hollywood");
                  String url_value = jo_inside.getString("url");
  
                  //Add your values in your `ArrayList` as below:
                  m_li = new HashMap&lt;String, String&gt;();
                  m_li.put("formule", formula_value);
                  m_li.put("url", url_value);
  
                  formList.add(m_li);
              }
          } catch (JSONException e) {
              e.printStackTrace();
          }
          recycleradapter = new MyAdapter(mArrayList);
          recyclerView.setAdapter(recycleradapter);
  
          recyclerViewstart();
          loadJSONFromAsset();
  
  
      }
  
      private String loadJSONFromAsset() {
          String json = null;
          try {
  
              InputStream is = getAssets().open("homepage.json");
  
              int size = is.available();
  
              byte[] buffer = new byte[size];
  
              is.read(buffer);
  
              is.close();
  
              json = new String(buffer, "UTF-8");
  
  
          } catch (IOException ex) {
              ex.printStackTrace();
              return null;
          }
          return json;
  
  
      }
  
      private void recyclerViewstart() {
          recyclerView=(RecyclerView)findViewById(R.id.recylce);
          recyclerView.setHasFixedSize(true);
          RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(this);
          recyclerView.setLayoutManager(layoutManager);
  
      }
  }
  </code></pre>