本文整理了Java中com.fasterxml.jackson.databind.node.ObjectNode.isNull()
方法的一些代码示例,展示了ObjectNode.isNull()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectNode.isNull()
方法的具体详情如下:
包路径:com.fasterxml.jackson.databind.node.ObjectNode
类名称:ObjectNode
方法名:isNull
暂无
代码示例来源:origin: ebean-orm/ebean
if (node.isNull()) {
return null;
代码示例来源:origin: semantic-integration/hypergraphql
private String langSTR(ObjectNode langArg) {
if (langArg.isNull()) {
return "";
}
final String LANGARG = "(lang:\"%s\")";
return String.format(LANGARG, langArg.get("lang").asText());
}
代码示例来源:origin: hypergraphql/hypergraphql
private String langSTR(ObjectNode langArg) {
if (langArg.isNull()) {
return "";
}
final String LANGARG = "(lang:\"%s\")";
return String.format(LANGARG, langArg.get("lang").asText());
}
代码示例来源:origin: org.apache.james/james-server-jmap
public UpdateMessagePatch fromJsonNode(ObjectNode updatePatchNode) {
if (updatePatchNode == null || updatePatchNode.isNull() || updatePatchNode.isMissingNode()) {
throw new IllegalArgumentException("updatePatchNode");
}
if (! validator.isValid(updatePatchNode)) {
return UpdateMessagePatch.builder()
.validationResult(validator.validate(updatePatchNode))
.build();
}
try {
return jsonParser.readerFor(UpdateMessagePatch.class).<UpdateMessagePatch>readValue(updatePatchNode);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
代码示例来源:origin: com.jivesoftware.os.tasmo/tasmo-configuration
if (instanceNode == null || instanceNode.isNull()) {
throw new IllegalArgumentException("Events must contain a populated instance node");
代码示例来源:origin: com.adobe.ride/ride-model-util
(ObjectNode) (objectJsonNodeData.at(parentSearchString).get(nodeName));
if (currentValue == null || currentValue.isMissingNode() || currentValue.isEmpty(null)
|| currentValue.isNull()) {
JSONObject nodeDef = null;
if (parentSearchString != "/") {
代码示例来源:origin: io.ebean/ebean
if (node.isNull()) {
return null;
代码示例来源:origin: com.jivesoftware.os.tasmo/tasmo-view-reader-service
public boolean add(ViewDescriptor viewDescriptor,
ModelPath modelPath,
Id[] modelPathIds,
String[] viewPathClasses,
ViewValue viewValue,
Long timestamp) throws IOException {
byte[] value = (viewValue == null) ? null : viewValue.getValue();
viewSizeInBytes += (value == null) ? 0 : value.length;
if (viewSizeInBytes > viewMaxSizeInBytes) {
LOG.error("ViewDescriptor:" + viewDescriptor + " is larger than viewMaxReadableBytes:" + viewMaxSizeInBytes);
return false;
}
if (viewValue == null || viewValue.getValue() == null || viewValue.getValue().length == 0) {
return false;
}
ObjectNode valueObject = merger.toObjectNode(viewValue.getValue());
if (valueObject == null || valueObject.isNull() || valueObject.size() == 0) {
return false;
}
ObjectId[] modelPathInstanceIds = modelPathInstanceIds(modelPathIds, viewPathClasses, modelPath.getPathMembers());
LOG.debug("Read view path -> with id={} instance ids={} value={} timestamp={}", new Object[]{modelPath.getId(), modelPathIds, viewValue, timestamp});
if (treeRoot == null) {
treeRoot = new MapTreeNode(modelPathInstanceIds[0]);
}
treeRoot.add(modelPath.getPathMembers().toArray(new ModelPathStep[modelPath.getPathMemberSize()]), modelPathInstanceIds, viewValue, timestamp);
return true;
}
内容来源于网络,如有侵权,请联系作者删除!