1. 引入jar包
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.4</version>
<classifier>jdk15</classifier>
</dependency>
2. 解析
JSONObject jsonObject = JSONObject.fromObject("json字符串");
String openid = jsonObject.getString("openid");