META-INF.vertx.vertx-web-api-service-codegen.utils.txt Maven / Gradle / Ivy
public static Object searchInJson(JsonObject obj, String key) {
if ("body".equals(key)) return obj.getValue("body");
if (obj.getJsonObject("path").containsKey(key)) return obj.getJsonObject("path").getValue(key);
if (obj.getJsonObject("query").containsKey(key)) return obj.getJsonObject("query").getValue(key);
if (obj.getJsonObject("header").containsKey(key)) return obj.getJsonObject("header").getValue(key);
if (obj.getJsonObject("cookie").containsKey(key)) return obj.getJsonObject("cookie").getValue(key);
if (obj.getJsonObject("form").containsKey(key)) return obj.getJsonObject("form").getValue(key);
return null;
}
public static Optional
© 2015 - 2025 Weber Informatics LLC | Privacy Policy