First: can someone provide an explanation of the differences between org.json.simple.JSONObject
and org.json.JSONObject
?
Second: I have a code with org.json.JSONObject
and org.json.JSONException
. When I edit the code in eclipse ( JUNO) it resolves the type of JSONException
and imports the package org.json.JSONException
but when I run the project using maven in command line I have a problem ( JSONException cannot be resolved to a type
). I tried to solve the issue by adding dependency to pom.xml like this :
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
</dependency>
but I am not sure if it is the right one . I even download the jar of org. java-json.jar and add it to web deployment assembly but still the same error. Can anyone help ?