Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Json result processing
    primarykey
    data
    text
    <p>I have Json result like this: array.getJSONObject(j) --</p> <blockquote> <p>{"ExecutiveCode":"WAT2 ","FreeIssuePrefix":"<br> ","DisPaySchedulePrefix":"","NextFreeIssueNo":"1","NextReturnNo":"20","UploadedType":"1","DisNextFreeIssueNo":"1","DisNextFOCNo":"1","NextVisitNo":"15","DisNextOrderNo":"1","UploadedOn":"Jun 17 2011 6:33PM","NextReturnAcceptNo":"1","BusinessUnit":"HEMA","TXNReferencePrefix":"20110708 ","OrderPrefix":"OR4 ","UploadedMethod":"3","FOCPrefix":"<br> ","ReturnPrefix":"RT4 ","RetailerPrefix":"TEM4","NextRetailerNo":"10","NextInvoiceNo":"1","NextGRNNo":"1","InvoicePrefix":"IN4 ","NextTXNReference":"2","NextOrderNo":"37","ReturnAcceptPrefix":"<br> ","PaySchedulePrefix":"PS4","NextReceiptNo":"1","NextFOCNo":"20","NextPayScheduleNo":"41","NextGRONo":"1","DisReturnPrefix":" ","DisReceiptPrefix":" ","DisNextReturnNo":"1","DisOrderPrefix":"<br> ","DisNextReceiptNo":"1","DisNextPayScheduleNo":"1","NextActivityNo":"1","DisInvoicePrefix":" ","DisNextInvoiceNo":"1","UploadedBy":"WAT2","DisFreeIssuePrefix":"<br> ","DisFOCPrefix":" ","ReceiptPrefix":"RP4 "}</p> </blockquote> <p>And I have take vaue &amp; name in the list:</p> <p>I have written like this :</p> <pre><code>try { // getSoapResponseTableDataJson(responsePrimitiveData, // null,tablesName.get(i)); String result = responsePrimitiveData.toString(); JSONObject jsonobject = new JSONObject(result); ArrayList&lt;String&gt; toFieldList = new ArrayList&lt;String&gt;(); ArrayList&lt;String&gt; toFieldValList = new ArrayList&lt;String&gt;(); JSONArray array = jsonobject.getJSONArray("Table1"); int max = array.length(); HashMap&lt;String, String&gt; applicationSettings = new HashMap&lt;String, String&gt;(); for (int j = 0; j &lt; max; j++) { System.out.println(" -- array.getJSONObject(j) -- " + array.getJSONObject(j)); String value = array.getJSONObject(j).getString("value"); String name = array.getJSONObject(j).getString("name"); applicationSettings.put(name, value); } System.out.println(" ---- json --- "+ applicationSettings); } catch (JSONException e) { e.printStackTrace(); } </code></pre> <p>This is saying : <strong>org.json.JSONException : No value for value</strong></p> <p>what is name &amp; value? </p> <p>Actually I want to get the Key separate list &amp; value pair in separate list.... I want to take like this name like : <code>{ExecutiveCode,FreeIssuePrefix,DisPaySchedulePrefix,.....}</code> value like : <code>{WAT2, "","TEst",.....}</code></p> <p>Please help me.</p> <p>Thanks in advance....</p>
    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.
 

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