![JAR search and dependency download from the Maven repository](/logo.png)
com.viaoa.json.OAJsonUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of oa-core Show documentation
Show all versions of oa-core Show documentation
Object Automation library
package com.viaoa.json;
import java.io.StringReader;
import javax.json.Json;
import javax.json.stream.JsonParser;
import javax.json.stream.JsonParser.Event;
public class OAJsonUtil {
public void test(String sz) {
final JsonParser parser = Json.createParser(new StringReader(sz));
String key = null;
String value = null;
while (parser.hasNext()) {
final Event event = parser.next();
if (event == Event.KEY_NAME) {
key = parser.getString();
}
else if (event == Event.VALUE_STRING) {
if ("http://wso2.org/claims/enduser".equalsIgnoreCase(key)) {
value = parser.getString();
break;
}
}
}
parser.close();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy