本文整理了Java中com.fasterxml.jackson.databind.node.ObjectNode.at()
方法的一些代码示例,展示了ObjectNode.at()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectNode.at()
方法的具体详情如下:
包路径:com.fasterxml.jackson.databind.node.ObjectNode
类名称:ObjectNode
方法名:at
暂无
代码示例来源:origin: com.netflix.spinnaker.orca/orca-core
private JsonNode getPointer(String pointer, ObjectNode rootNode) {
return pointer != null ? rootNode.at(pointer) : rootNode;
}
代码示例来源:origin: io.wcm.caravan/io.wcm.caravan.pipeline.impl
int getStatusCode() {
return metadataNode.at("/statusCode").asInt(HttpStatus.SC_OK);
}
代码示例来源:origin: io.wcm.caravan/io.wcm.caravan.pipeline.impl
String getReasonString() {
return metadataNode.at("/reason").asText("Not Found");
}
代码示例来源:origin: io.wcm.caravan/io.wcm.caravan.pipeline.impl
String getSources() {
return metadataNode.at("/sources").toString();
}
代码示例来源:origin: io.wcm.caravan/io.wcm.caravan.pipeline.impl
String getGeneratedDate() {
return metadataNode.at("/generated").asText();
}
代码示例来源:origin: io.syndesis.server/server-api-generator
public static ObjectNode resolveSchemaForReference(final ObjectNode json, final String title, final String reference) {
final ObjectNode dereferenced = (ObjectNode) json.at(reference.substring(1));
return createJsonSchema(title, dereferenced);
}
代码示例来源:origin: io.syndesis.server/server-connector-generator
public static ObjectNode resolveSchemaForReference(final ObjectNode json, final String title, final String reference) {
final ObjectNode dereferenced = (ObjectNode) json.at(reference.substring(1));
return createJsonSchema(title, dereferenced);
}
代码示例来源:origin: io.wcm.caravan/io.wcm.caravan.pipeline.impl
int getExpirySeconds() {
if (!metadataNode.has("expires")) {
return (int)TimeUnit.DAYS.toSeconds(365);
}
String expiryDate = metadataNode.at("/expires").asText();
return CacheDateUtils.getSecondsUntil(expiryDate);
}
代码示例来源:origin: io.ratpack/ratpack-core
@Override
public <O> ConfigObject<O> getAsConfigObject(String pointer, TypeToken<O> type) {
JsonNode node = pointer != null ? rootNode.at(pointer) : rootNode;
if (node.isMissingNode()) {
node = emptyNode;
}
try {
JavaType javaType = objectMapper.getTypeFactory().constructType(type.getType());
O value = objectMapper.readValue(new TreeTraversingParser(node, objectMapper), javaType);
return new DefaultConfigObject<>(pointer, type, value);
} catch (IOException ex) {
throw Exceptions.uncheck(ex);
}
}
代码示例来源:origin: Netflix/metacat
&& !objectNode.get().at(DELETION_COLUMN_PATH).isMissingNode()
&& !objectNode.get().at(PARTITION_COLUMN_DATA_TYPE_PATH).isMissingNode()) {
final String deleteColumn = objectNode.get().at(DELETION_COLUMN_PATH).textValue();
objectNode.get().at(PARTITION_COLUMN_DATA_TYPE_PATH).textValue());
代码示例来源:origin: jurmous/etcd4j
/**
* Gets the content of the key recursively as a JsonObject
* @param path root path (i.e. /path1/path2)
* @param etcdClient EtcdClient
* @return JsonNode
* @throws IOException
* @throws EtcdAuthenticationException
* @throws TimeoutException
* @throws EtcdException
*/
public static JsonNode getAsJson(String path, EtcdClient etcdClient)
throws IOException, EtcdAuthenticationException, TimeoutException, EtcdException {
EtcdKeyGetRequest etcdKeyGetRequest = etcdClient.get(path).recursive();
EtcdKeysResponse dataTree = etcdKeyGetRequest.send().get();
ObjectNode jNode = JsonNodeFactory.instance.objectNode();
if (dataTree.getNode().getNodes().isEmpty()) {
iterateOverNodes(jNode, dataTree.getNode());
} else {
for (EtcdNode node : dataTree.getNode().getNodes()) {
iterateOverNodes(jNode, node);
}
}
return dotNotationToStandardJson(jNode.at(path));
}
内容来源于网络,如有侵权,请联系作者删除!