Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your JSON is invalid, there's an error in your line 22 at 3rd object of your array </p> <blockquote> <p>"judul":"Article Four"",</p> </blockquote> <p>Correct JSON is</p> <pre><code>{ "status": "1", "total": 20, "artikel": [ { "tanggal": "2013-08-07", "judul": "Article One", "kutipan": "Example of article quote..." }, { "tanggal": "2013-07-23", "judul": "Article Two", "kutipan": "Example of article quote......" }, { "tanggal": "2013-07-22", "judul": "Article Three", "kutipan": "Example of article quote......" }, { "tanggal": "2013-03-16", "judul": "Article Four", "kutipan": "Exampleofarticlequote,..." } ] } </code></pre> <p>Ok, Now you are getting Network related exception so, solution to this is, you've to use demo code like</p> <pre><code>@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); new NetworkThread().execute(); } class NetworkThread extends AsyncTask&lt;Void, Void, Void&gt; { @Override protected Void doInBackground(Void... voids) { ArrayList&lt;HashMap&lt;String, String&gt;&gt; artikelList = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;(); JSONParser jParser = new JSONParser(); JSONObject json = jParser.getJSONFromUrl(ArtikelURL); try { JSONArray artikels = json.getJSONArray("artikel"); for(int i = 0; i &lt; artikels.length(); i++){ JSONObject c = artikels.getJSONObject(i); // Storing each json item in variable String tanggal = c.getString(TAG_TGL); String judul = c.getString(TAG_JUDUL); String kutipan = c.getString(TAG_KUTIPAN); HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;(); map.put(TAG_TGL, tanggal); map.put(TAG_JUDUL, judul); map.put(TAG_KUTIPAN, kutipan); artikelList.add(map); } } catch (JSONException e) { e.printStackTrace(); } return null; } @Override protected void onPostExecute(Void aVoid) { super.onPostExecute(aVoid); } } </code></pre> <p>Don't forget to add this to AndroidManifest.xml file:</p> <pre><code>&lt;uses-permission android:name="android.permission.INTERNET"/&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload