vscode-contrib-jsonc
v1.0.0-beta.2
Published
Parses JSON C and provides validation using json-schema.org
Downloads
12
Readme
VsCode Json Parser
Parses JSON and provides validation using http://json-schema.org
Source extracted from https://github.com/Microsoft/vscode-json-languageservice/blob/master/src/parser/jsonParser.ts
Install
node install vscode-contrib-jsonc
Usage
import {parse} from 'vscode-contrib-jsonc';
let jsonDocument = parse(jsonText);
if (jsonDocument.validationResult.errors.length > 0)
console.log(jsonDocument.validationResult.errors);
jsonDocument.root.getChildNodes().forEach(node => {
console.log(node);
});
Change Log
- 1.0.0-beta.2
- Switched to use the newly extracted https://github.com/Microsoft/node-jsonc-parser
- Updated jsonParser from the newly extracted https://github.com/Microsoft/vscode-json-languageservice