1. First, the environment is Intellijidea 16, building Java projects with MAVEN, working with JSON-formatted content, so you need to import Java's external JSON jar package,
There are two types of JSON packages that are generally used: Org.json and Json-lib
Official website: http://maven.outofmemory.cn/org.json/json/
MAVEN relies on the notation:
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20140107</version>
</dependency>
Official website: http://json-lib.sourceforge.net/
MAVEN relies on the notation:
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.4</version>
<classifier>jdk15</classifier>
</dependency>
Json-lib has two versions, one is to support jdk13, one is jdk15, and if no attributes are added, Idea will error.
Reference post: http://www.cnblogs.com/yqskj/archive/2013/05/27/3101934.html
http://blog.csdn.net/dmcpxy/article/details/52024011
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20140107</version>
</dependency>
Java uses JSON