jsonast
    TypeScript icon, indicating that this package has built-in type declarations

    0.2.1 • Public • Published

    jsonast is a json to ast parser with some error correction

    license npm dep dev travis coveralls commitizen Standard Version

    Rationale

    jsonast is a json to AST parser with some error correction. Most json parsers do not do error correction or do not allow parsing to AST. jsonast combines both of this.

    Installation

    Grab jsonast via npm:

    npm install jsonast

    API documentation

    import parse from 'jsonast';
     
    // Allows plain valid json
    const ast = parse('{}');
     
    // but also invalid json like this ones (note the missing commas)
    const ast = parse(`
      {
        "key1": "value"
        "key2": "value"
      }
    `);
    const ast = parse(`
      [
        "entry1"
        "entry2"
      ]
    `);

    jsonast is built by KnisterPeter and contributors and released under the MIT license.

    Install

    npm i jsonast

    DownloadsWeekly Downloads

    1

    Version

    0.2.1

    License

    MIT

    Last publish

    Collaborators

    • knisterpeter