Checks that given JSON node is null

@Then the JSON node :node should be null
554849
public function theJsonNodeShouldBeNull($node)
    {
        $actual = $this->getJsonNodeValue($node);
        PHPUnit::assertNull($actual, sprintf('The node value is `%s`', json_encode($actual)));
    }
819153
public function allowsNull()
    {
        if (!empty($this->node->type)) {
            // with type hint, checks if NULL constant provided
            if ($this->node->default instanceof Node\Expr\ConstFetch
                && $this->node->default->name instanceof Node\Name
                && strcasecmp('null', (string)$this->node->default->name) === 0
            ) {
                return true;
            }
            return false;
        }
        return true;
    }
301645
function empty(node) {
		while (node && node.hasChildNodes()) {
			var child = node.firstChild;
			node.removeChild(child);
		}
	}
1145119
public static Optional<String> stringValue(JsonNode json, String key) {
        return Optional.ofNullable(json.findValue(key)).map(JsonNode::asText);
    }
244788
function (nodes, id) {
            for (var i = 0; i < nodes.length; i++) {
                var attrId = nodes.item(i).getAttribute("id");
                if (!attrId) {
                    continue;
                }
                if (attrId.toString() === id) {
                    return nodes.item(i);
                }
            }
            return null;
        }
935391
function determineJSON(xml) {
	var json = null;
	parseString(xml, function(err, result) {
		if (err) {
			// TODO
			console.log(err);
		} else {
			json = result;
		}
	});
	return json;
}
1106256
public JsonFluentAssert isAbsent() {
        if (!nodeAbsent(actual, path, configuration)) {
            failOnDifference("node to be absent", quoteTextValue(getNode(actual, path)));

        }
        return this;
    }
441322
private static JsonNode toJson(AggregatedHttpMessage res, @Nullable JsonNodeType expectedNodeType) {
        final String content = toString(res);
        final JsonNode node;
        try {
            node = Jackson.readTree(content);
        } catch (JsonParseException e) {
            throw new CentralDogmaException("failed to parse the response JSON", e);
        }

        if (expectedNodeType != null && node.getNodeType() != expectedNodeType) {
            throw new CentralDogmaException(
                    "invalid server response; expected: " + expectedNodeType +
                    ", actual: " + node.getNodeType() + ", content: " + content);
        }
        return node;
    }
1193675
public static DataError findErrorForDoc(List<DataError> list, JsonNode node) {
        for (DataError x : list) {
            if (x.entityData == node) {
                return x;
            }
        }
        return null;
    }
831082
@Override
    public JsonNode visit(JmesPathField fieldNode, JsonNode input) {
        if (input.isObject()) {
            //TODO : CamelCase will need to change at some point
            return input.get(CamelCaseUtils.toCamelCase(fieldNode.getValue()));
        }
        return NullNode.getInstance();
    }
1110208
private void checkForNull(String name, Object value) {
        if(name == null) {
            throw new NullPointerException("name must not be null");
        }
        if(value == null) {
            throw new NullPointerException("value must not be null");
        }
    }
903478
private static void processJsonToTree(final TreeItemIdNode parentNode, final JsonObject json) {

		String id = json.getAsJsonPrimitive("id").getAsString();
		JsonPrimitive expandableJson = json.getAsJsonPrimitive("expandable");

		TreeItemIdNode node = new TreeItemIdNode(id);
		if (expandableJson != null && expandableJson.getAsBoolean()) {
			node.setHasChildren(true);
		}
		parentNode.addChild(node);

		JsonArray children = json.getAsJsonArray("items");
		if (children != null) {
			for (int i = 0; i < children.size(); i++) {
				JsonObject child = children.get(i).getAsJsonObject();
				processJsonToTree(node, child);
			}
		}
	}
307893
public static boolean isValidJson(String jsonStr) {
        if (jsonStr == null || jsonStr.trim()
                .equals("")) {
            return false;
        }
        try {
            Object object = JSON.parse(jsonStr);
            if (object instanceof JSONObject) {
                return true;
            } else if (object instanceof JSONArray) {
                return true;
            }
        } catch (Throwable e) {
            return false;
        }
        return false;
    }
951536
private static Optional<ICondition> asNot( JsonObject json)
    {
    return
      json.containsKey( NOT_KEY)
      ? Optional.of( new Not( asCondition( json.getJsonObject( NOT_KEY))))
      : Optional.empty();
    }
351672
public static final <T extends JavaScriptObject> T checkNull(T js) {
    if (!GWT.isProdMode() && js == null) {
      throw new NullPointerException();
    }
    return js;
  }
723098
private static NodeCondition getNodeReadyCondition(Node node) {
    Utils.checkNotNull(node, "Node can't be null.");

    if (node.getStatus() == null || node.getStatus().getConditions() == null) {
      return null;
    }

    for (NodeCondition condition : node.getStatus().getConditions()) {
      if (NODE_READY.equals(condition.getType())) {
        return condition;
      }
    }
    return null;
  }
741775
@Override
    public void contains(JsonElement expectedJson) {
        assertTrue("Expected to find " + GSON.toJson(expectedJson), checkContains(expectedJson));
    }