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

https://github.com/truewinter/orderedjson


https://github.com/truewinter/orderedjson

Last synced: 8 months ago
JSON representation

Awesome Lists containing this project

README

          

# OrderedJSON

As the name suggests, OrderedJSON keeps the order in which key-value pairs were added. This is important for use-cases such as hashing or signing a JSON object.

## Installing

```sh
npm install --save @truewinter/orderedjson
```

## Usage

```js
var json = new OrderedJSON();
json.add('test', 'testing');
json.add('1234', 5678);

console.log(json.getJSON());
```

**Imporant**: Only the following value types are supported: string, number, boolean, array, JSON, OrderedJSON.