I need to import JSON library into netbeans.
How can I do that?
I searched on internet and I found this article.
According to this article when I import
import org.json.simple.JSONArray;
import org.json.simple.JSONObject
that, it must be work. But unfortunately it didn't work. and I get an error:
Package doesnt exist
Thanks for your help.
As the article says you need to add the simple-json library to your project:
http://code.google.com/p/json-simple/
For this we have to add Class org.json.JSONObject which available in json-20131018.jar. We need to download this jar and add this jar to your buildpath.
for it in netbeans right click 'libraries' in the project list, then click add jar/folder.
Download jar from here : https://code.google.com/archive/p/json-simple/downloads And then add it to your "libraries" in netbeans.
Added this answer, because other answer didn't provide the above link, which is the easiest to download jar from.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With