how can i retrive data from Json..Here is my code
protected void onMain_ButtonAction(final Component c, ActionEvent event) {
ConnectionRequest r = new ConnectionRequest() {
Hashtable h;
@Override
protected void readResponse(InputStream input) throws IOException {
JSONParser p = new JSONParser();
h = p.parse(new InputStreamReader(input));
ArrayList<Map<String, Object>> a = new ArrayList<Map<String, Object>>();
HashMap<String, Object> m = new HashMap<String, Object>();
m.put("Label1",h.toString());
for (String key : m.keySet()) {
a.add(m);
System.out.println("key: " + key );
};
// NetworkManager.getInstance().addToQueue(request);
r.setPost(false);
InfiniteProgress prog = new InfiniteProgress();
Dialog dlg = prog.showInifiniteBlocking();
r.setDisposeOnCompletion(dlg);
NetworkManager.getInstance().addToQueue(r);
}
}
Please help me for this...Thanks
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA
Desktop OS
Simulator
Device