1、json字符串为 { "key" : "value" }
import com.alibaba.fastjson.JSONObject;
//json字符号转换为json对象,然后获得key对应value
public static String getJsonValue(String jsonStr, String key) {
JSONObject jsonObj = JSONObject.parseObject(jsonStr);
return jsonObj.get(key).toString();
}