I'm a total java newbie and I have this problem. I try to decode Json and in order to do that I want to import these packages:
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
"The import cannot be resolved"... are these packages unavailable anymore or do I have to do something else in order to make them work?
Thanx in advance.
Probably your simple json.jar file isn't in your classpath.
I was facing same issue in my Spring Integration project. I added below JSON dependencies in pom.xml file. It works for me.
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
</dependency>
A list of versions can be found here: https://mvnrepository.com/artifact/org.json/json
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