PhpParser\Comment::jsonSerialize PHP Method

jsonSerialize() public method

public jsonSerialize ( )
    public function jsonSerialize()
    {
        // Technically not a node, but we make it look like one anyway
        $type = $this instanceof Comment\Doc ? 'Comment_Doc' : 'Comment';
        return ['nodeType' => $type, 'text' => $this->text, 'line' => $this->line, 'filePos' => $this->filePos];
    }