Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>So first off to state what was said above you JSON code is incorrectly formatted. You can validate you have correctly formated JSON code by going to <a href="http://json.parser.online.fr/" rel="nofollow">http://json.parser.online.fr/</a>. Your correct JSON would be as follows (you were missing a closing }) </p> <pre><code>{ "ics_desire": { "version": "Beta 0.1.1", "description": "description here", "build-fingerprint": "fingerprint" } } </code></pre> <p>Next, here is an example of a working JSON code that I have used to test with in the past. </p> <pre><code>{ "HealthySubstituteData": [ { "Assoc_ID": "1", "uFood": "White Flour", "hFood": "Wheat Flour", "Category": "Baking", "Description": "You can substitute blah blah blah...", "Count": "5", "submittedBy": "Administrator" } ] } </code></pre> <p>And here is the code I use to get that data. </p> <pre><code> ArrayList&lt;HashMap&lt;String, String&gt;&gt; mylist = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;(); JSONObject json = JSONfunctions.getJSONfromURL("http://your.url.com/whaterver"); try { JSONArray healthySubstituteData = json.getJSONArray("HealthySubstituteData"); for(int i=0;i&lt;healthySubstituteData.length();i++) { HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;(); JSONObject e = healthySubstituteData.getJSONObject(i); map.put("Assoc_ID", (String) e.get("Assoc_ID")); map.put("uFood", (String) e.get("uFood")); map.put("hFood", (String) e.get("hFood")); map.put("category", (String) e.get("Category")); map.put("description", (String) e.get("Description")); map.put("count", (String) e.get("Count")); map.put("submittedBy", (String) e.get("submittedBy")); mylist.add(map); } } </code></pre> <p>So now I end up with an array list of type HashMap and I can do whatever I want with it at that point. </p>
    singulars
    1. This table or related slice is empty.
    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. This table or related slice is empty.
    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