use of io.smallrye.graphql.client.impl.typesafe.json.JsonUtils in project smallrye-graphql by smallrye.
the class ResultBuilder method getPath.
private static List<Object> getPath(JsonValue jsonValue) {
JsonValue value = jsonValue.asJsonObject().get("path");
JsonArray jsonArray;
if (value != null && value.getValueType().equals(JsonValue.ValueType.ARRAY)) {
jsonArray = value.asJsonArray();
} else {
jsonArray = null;
}
return (jsonArray == null) ? null : jsonArray.stream().map(JsonUtils::toValue).collect(Collectors.toList());
}
Aggregations