FluentDOM\Serializer\Json::jsonSerialize PHP Method

jsonSerialize() public method

public jsonSerialize ( ) : mixed
return mixed
    public function jsonSerialize()
    {
        $node = $this->_node;
        if ($node instanceof \DOMDocument) {
            $node = $node->documentElement;
        }
        if (isset($node)) {
            return $this->getNode($node);
        }
        return $this->getEmpty();
    }