An open API service indexing awesome lists of open source software.

https://github.com/zhuyingda/yastjson

yet another fast json.
https://github.com/zhuyingda/yastjson

abstract-syntax-tree ast json json-parser

Last synced: 10 months ago
JSON representation

yet another fast json.

Awesome Lists containing this project

README

          

# yastjson
[![npm version](https://badge.fury.io/js/yastjson.svg)](https://badge.fury.io/js/yastjson)
[![Build Status](https://travis-ci.org/zhuyingda/yastjson.svg?branch=master)](https://travis-ci.org/zhuyingda/yastjson)
[![codecov](https://codecov.io/gh/zhuyingda/yastjson/branch/master/graph/badge.svg)](https://codecov.io/gh/zhuyingda/yastjson)

## Overview
Yastjson is **Y**et **A**nother fa**ST** **JSON**, which provide you a second choice of `JSON.parse` method instead of the native function in Node.js.

## Installation

```
npm install yastjson

npm test
```

or

clone [github repository](https://github.com/zhuyingda/yastjson)

## Usage

```
const YJSON = require('yastjson');

let jsonString = '{"a":1}';
let obj = YJSON.parse(jsonString);
console.log(obj);
```

You will get the object, just like using `JSON.parse`.

## Design

### Token Definition
![](https://www.zhuyingda.com/static/img/yastjson-token.svg)

### Lexical Analysis
![](https://www.zhuyingda.com/static/img/yastjson-fsm.svg)

### Syntactic Analysis
![](https://www.zhuyingda.com/static/img/yastjson-bnf.svg)

## License

[GPL-V3](http://www.gnu.org/licenses/)

Copyright (c) 2020-present, Yingda (Sugar) Zhu