This package has been deprecated

Author message:

WARNING: This project has been renamed to mojangson. Install using mojangson instead.

node-mojangson

0.1.1 • Public • Published

node-mojangson

NPM version Build Status

node-mojangson is a mojangson parser.

Mojangson specification

Mojangson is mojang's variant of json. It is basically json with the following changes :

  • array can be indexed (example : [0:"v1",1:"v2",2:"v3"])
  • array and object can have trailing comma (example : [5,4,3,] and {"a":5,"b":6,})
  • there can be string without quote (example : {mykey:myvalue})
  • numbers can be suffixed by b, s, l, f or the same in upper case (example : {number:5b})
  • mojangson stays a superset of json : every json is a mojangson

Parser

This parser is build using jison.

See the grammar and the examples in the test for more information.

Usage

Usage example :

var mojangson=require("mojangson");
console.log(mojangson.parse("{mykey:myvalue}"));

The provided method mojangson.parse return a javascript object corresponding to the mojangson passed in input.

Dependents (0)

Package Sidebar

Install

npm i node-mojangson

Weekly Downloads

1

Version

0.1.1

License

MIT

Last publish

Collaborators

  • rom1504