public function theJsonNodeShouldNotExist($jsonNode)
    {
        $e = null;

        try {
            $realValue = $this->evaluateJsonNodeValue($jsonNode);
        } catch (\Exception $e) {
            // If the node does not exist an exception should be throwed
        }

        if ($e === null) {
            throw new WrongJsonExpectation(
                sprintf("The node '%s' exists and contains '%s'.", $jsonNode, json_encode($realValue)),
                $this->readJson(),
                $e
            );
        }
    }
public function theJsonNodeShouldNotExist($jsonNode)
    {
        $e = null;

        try {
            $realValue = $this->evaluateJsonNodeValue($jsonNode);
        } catch (\Exception $e) {
            // If the node does not exist an exception should be throwed
        }

        if ($e === null) {
            throw new WrongJsonExpectation(
                sprintf("The node '%s' exists and contains '%s'.", $jsonNode, json_encode($realValue)),
                $this->readJson(),
                $e
            );
        }
    }
public function theJsonNodeShouldNotExist ( $ jsonNode ) { $ e = null ; try { $ realValue = $ this -> evaluateJsonNodeValue ( $ jsonNode ) ; } catch ( \ Exception $ e ) { // If the node does not exist an exception should be throwed } if ( $ e === null ) { throw new WrongJsonExpectation ( sprintf ( "The node '%s' exists and contains '%s'." , $ jsonNode , json_encode ( $ realValue ) ) , $ this -> readJson ( ) , $ e ) ; } }
Checks, that given JSON node does not exist.

@Given /^the JSON node "(?P<jsonNode>[^"]*)" should not exist$/
Checks that given JSON node does not exist .