本文整理了Java中org.codehaus.jackson.JsonNode.isMissingNode()
方法的一些代码示例,展示了JsonNode.isMissingNode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonNode.isMissingNode()
方法的具体详情如下:
包路径:org.codehaus.jackson.JsonNode
类名称:JsonNode
方法名:isMissingNode
[英]Method that returns true for "virtual" nodes which represent missing entries constructed by path accessor methods when there is no actual node matching given criteria.
Note: one and only one of methods #isValueNode, #isContainerNode and #isMissingNode ever returns true for any given node.
[中]方法,当没有实际节点匹配给定条件时,该方法为“虚拟”节点返回true,这些节点表示由路径访问器方法构造的缺失项。
注意:对于任何给定节点,方法#isValueNode、#isContainerNode和#isMissingNode中只有一个会返回true。
代码示例来源:origin: com.atlassian.jira/jira-core
public boolean isMissingNode()
{
return delegate.isMissingNode();
}
代码示例来源:origin: org.mule.modules/mule-module-json
public boolean hasNode(String key)
{
JsonNode result = node.path(key);
return result.isMissingNode() == false;
}
代码示例来源:origin: org.apache.isis.viewer/isis-viewer-restfulobjects-applib
private Boolean isNull(final JsonNode node) {
if (node == null || node.isMissingNode()) {
// not exclude if node.isNull, cos that's the point of this.
return null;
}
return node.isNull();
}
代码示例来源:origin: org.apache.isis.viewer/json-applib
private Boolean isNull(final JsonNode node) {
if (node == null || node.isMissingNode()) {
// not exclude if node.isNull, cos that's the point of this.
return null;
}
return node.isNull();
}
代码示例来源:origin: oVirt/ovirt-engine
boolean checkRequiredNonEmptyStringNode(JsonNode root, String fieldName) {
JsonNode target = root.path(fieldName);
return !target.isMissingNode() && target.isTextual() && !target.getTextValue().trim().isEmpty();
}
代码示例来源:origin: oVirt/ovirt-engine
public boolean isLazyLoad() {
JsonNode target = descriptorNode.path(ATT_LAZYLOAD);
return !target.isMissingNode() ? target.getBooleanValue() : true;
}
代码示例来源:origin: oVirt/ovirt-engine
boolean checkOptionalNonEmptyStringNode(JsonNode root, String fieldName) {
JsonNode target = root.path(fieldName);
return !target.isMissingNode() ? target.isTextual() && !target.getTextValue().trim().isEmpty() : true;
}
代码示例来源:origin: oVirt/ovirt-engine
boolean checkOptionalObjectNode(JsonNode root, String fieldName) {
JsonNode target = root.path(fieldName);
return !target.isMissingNode() ? target.isObject() : true;
}
代码示例来源:origin: oVirt/ovirt-engine
boolean checkOptionalBooleanNode(JsonNode root, String fieldName) {
JsonNode target = root.path(fieldName);
return !target.isMissingNode() ? target.isBoolean() : true;
}
代码示例来源:origin: oVirt/ovirt-engine
public String getResourcePath() {
JsonNode target = descriptorNode.path(ATT_RESOURCEPATH);
return !target.isMissingNode() ? target.getTextValue() : null;
}
代码示例来源:origin: org.apache.isis.viewer/json-applib
private JsonRepresentation getNull(final String path, final JsonNode node) {
if (node == null || node.isMissingNode()) {
// exclude if node.isNull, cos that's the point of this.
return null;
}
checkValue(path, node, "the null value");
if (!node.isNull()) {
throw new IllegalArgumentException(formatExMsg(path, "is not the null value"));
}
return new JsonRepresentation(node);
}
代码示例来源:origin: org.apache.isis.viewer/isis-viewer-restfulobjects-applib
private JsonRepresentation getNull(final String path, final JsonNode node) {
if (node == null || node.isMissingNode()) {
// exclude if node.isNull, cos that's the point of this.
return null;
}
checkValue(path, node, "the null value");
if (!node.isNull()) {
throw new IllegalArgumentException(formatExMsg(path, "is not the null value"));
}
return new JsonRepresentation(node);
}
代码示例来源:origin: rdelbru/SIREn
private void convertLongitude(final JsonNode obj) {
final ObjectNode node = (ObjectNode) obj.path("ChargeDeviceLocation");
final JsonNode current = node.path("Longitude");
if (!current.isMissingNode() && !current.isNull()) {
final double value = Double.parseDouble(current.asText());
node.put("Longitude", value);
}
if (current.isNull()) {
node.remove("Longitude");
}
}
代码示例来源:origin: sirensolutions/siren
private void convertLongitude(final JsonNode obj) {
final ObjectNode node = (ObjectNode) obj.path("ChargeDeviceLocation");
final JsonNode current = node.path("Longitude");
if (!current.isMissingNode() && !current.isNull()) {
final double value = Double.parseDouble(current.asText());
node.put("Longitude", value);
}
if (current.isNull()) {
node.remove("Longitude");
}
}
代码示例来源:origin: rdelbru/SIREn
private void convertLatitude(final JsonNode obj) {
final ObjectNode node = (ObjectNode) obj.path("ChargeDeviceLocation");
final JsonNode current = node.path("Latitude");
if (!current.isMissingNode() && !current.isNull()) {
final double value = Double.parseDouble(current.asText());
node.put("Latitude", value);
}
if (current.isNull()) {
node.remove("Latitude");
}
}
代码示例来源:origin: sirensolutions/siren
private void convertLatitude(final JsonNode obj) {
final ObjectNode node = (ObjectNode) obj.path("ChargeDeviceLocation");
final JsonNode current = node.path("Latitude");
if (!current.isMissingNode() && !current.isNull()) {
final double value = Double.parseDouble(current.asText());
node.put("Latitude", value);
}
if (current.isNull()) {
node.remove("Latitude");
}
}
代码示例来源:origin: rdelbru/SIREn
private void convertDeviceOwnerWebsite(final JsonNode obj) {
final ObjectNode node = (ObjectNode) obj.path("DeviceOwner");
final JsonNode current = node.path("Website");
if (!current.isMissingNode() && !current.isNull()) {
node.put("Website", this.createValueDatatype("uri", current.asText()));
}
if (current.isNull()) {
node.remove("Website");
}
}
代码示例来源:origin: rdelbru/SIREn
private void convertDeviceControllerWebsite(final JsonNode obj) {
final ObjectNode node = (ObjectNode) obj.path("DeviceController");
final JsonNode current = node.path("Website");
if (!current.isMissingNode() && !current.isNull()) {
node.put("Website", this.createValueDatatype("uri", current.asText()));
}
if (current.isNull()) {
node.remove("Website");
}
}
代码示例来源:origin: sirensolutions/siren
private void convertDeviceControllerWebsite(final JsonNode obj) {
final ObjectNode node = (ObjectNode) obj.path("DeviceController");
final JsonNode current = node.path("Website");
if (!current.isMissingNode() && !current.isNull()) {
node.put("Website", this.createValueDatatype("uri", current.asText()));
}
if (current.isNull()) {
node.remove("Website");
}
}
代码示例来源:origin: sirensolutions/siren
private void convertDeviceOwnerWebsite(final JsonNode obj) {
final ObjectNode node = (ObjectNode) obj.path("DeviceOwner");
final JsonNode current = node.path("Website");
if (!current.isMissingNode() && !current.isNull()) {
node.put("Website", this.createValueDatatype("uri", current.asText()));
}
if (current.isNull()) {
node.remove("Website");
}
}
内容来源于网络,如有侵权,请联系作者删除!