#incremental #parsing #json

tree-sitter-json

json grammar for the tree-sitter parsing library

1 unstable release

0.19.0 Dec 20, 2021

#35 in Text editors

Download history 2/week @ 2022-01-19 1/week @ 2022-02-02 2/week @ 2022-02-16 1/week @ 2022-02-23 8/week @ 2022-03-02 2/week @ 2022-03-09 3/week @ 2022-03-16 194/week @ 2022-03-23 819/week @ 2022-03-30 580/week @ 2022-04-06 392/week @ 2022-04-13 202/week @ 2022-04-20 123/week @ 2022-04-27 282/week @ 2022-05-04

1,025 downloads per month

MIT license

31KB
996 lines

tree-sitter-json

Build/test

It is a fork of tree-sitter/tree-sitter-json for crates.io

JSON grammar for tree-sitter


lib.rs:

This crate provides json language support for the tree-sitter parsing library.

Typically, you will use the language function to add this language to a tree-sitter Parser, and then use the parser to parse some code:

let code = "";
let mut parser = tree_sitter::Parser::new();
parser.set_language(tree_sitter_json::language()).expect("Error loading json grammar");
let tree = parser.parse(code, None).unwrap();

Dependencies

~1.4–2MB
~52K SLoC