Skip to main content

json_document_value

Function json_document_value 

Source
pub fn json_document_value<'a>(root: &Node<'a>) -> Option<Node<'a>>
Expand description

Return the first non-comment value in a JSON document.

JSONC permits comments before the document value. Tree-sitter exposes those comments as named children, so callers must not assume named_child(0) is the object or array that contains the document’s data.