Hi Folks,
I have a question: How can you create a JSON object within a extension?
If I use the code
JSONObject jObject = new JSONObject(jsonString)
where jsonString is the json text I want to create the object from, I get an error at jsonString about incompatible type (incompatible types: String cannot be converted to ComponentContainer).
Any thoughts?
Cheers,
Lildinti
Hi Mika!
Thanks for you kind reply and apologies for the late reply to you but had some family problems and just coming back to work.
Anyway, my question is can I use these import in the IDE?
AndroidRuntime:
[mkdir] Created dir: /home/Makeroid/appinventor/components/build/classes/AndroidRuntime
[javac] Compiling 316 source files to /home/Makeroid/appinventor/components/build/classes/AndroidRuntime
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
[javac] /home/Makeroid/appinventor/components/src/com/google/appinventor/components/runtime/JSONObject.java:16: error: package org.json.simple does not exist
[javac] import org.json.simple.JSONArray;
[javac] ^
[javac] /home/Makeroid/appinventor/components/src/com/google/appinventor/components/runtime/JSONObject.java:17: error: package org.json.simple does not exist
[javac] import org.json.simple.JSONObject;
[javac] ^
What makes me think the JSON libs are not imported.
Thank you so much for any help and again, apologies for the late reply.
Cheers
Lildinti