Jacksonを使用してjsonデータを解析できません:
{"query": "mydata","status": "true","user_info": "user_info": "{"userid":"212233379","org_id":"6335567"}"}
私のコードは以下です
JsonFactory f = new JsonFactory();
JsonParser jp = f.createJsonParser(is);
jp.nextToken();
while (jp.nextToken() != JsonToken.END_OBJECT) {
if ("status".equals(jp.getCurrentName())) {
status = jp.getText();
jp.nextToken();
} else if ("user_info".equals(jp.getCurrentName())) {
jp.nextToken();
while (jp.nextToken() != JsonToken.END_OBJECT) {
String namefieldOne = jp.getCurrentName();
jp.nextToken();
if ("userid".equals(namefieldOne)) {
} else if ("org_id".equals(namefieldOne)) {
} else {
throw new IllegalStateException("Unrecognized field '" + jp.getCurrentName() + "'!");
}
}
}
}
jp.close();
plsヘルプ