public function toJson($format = Document::MININAL, $options = 0)
    {
        $this->exceptionlevel = 4;

        $json = json_encode($this->toArray($format), $options);

        $this->exceptionlevel = 3;

        return $json;
    }
public function toJson($format = Document::MININAL, $options = 0)
    {
        $this->exceptionlevel = 4;

        $json = json_encode($this->toArray($format), $options);

        $this->exceptionlevel = 3;

        return $json;
    }
public function toJson ( $ format = Document :: MININAL , $ options = 0 ) { $ this -> exceptionlevel = 4 ; $ json = json_encode ( $ this -> toArray ( $ format ) , $ options ) ; $ this -> exceptionlevel = 3 ; return $ json ; }
Convert DOM to JSON string

@param bool $format
@param int  $options `JSON_HEX_QUOT`, `JSON_HEX_TAG`, `JSON_HEX_AMP`, `JSON_HEX_APOS`, `JSON_NUMERIC_CHECK`, `JSON_PRETTY_PRINT`, `JSON_UNESCAPED_SLASHES`, `JSON_FORCE_OBJECT`, `JSON_PRESERVE_ZERO_FRACTION`, `JSON_UNESCAPED_UNICODE`, `JSON_PARTIAL_OUTPUT_ON_ERROR`. The behaviour of these constants is described in http://php.net/manual/en/json.constants.php

@return string
Convert DOM to JSON string