# vuvuzela

> Super simple and non-recursive JSON parse/stringify library

Latest version **1.0.3** (published 2016-04-28) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install vuvuzela
pnpm add vuvuzela
yarn add vuvuzela
bun add vuvuzela
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2016-04-28 |
| First published | 2014-09-05 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 53 |
| Author | Nolan Lawson |
| Maintainers | nolanlawson |
| Keywords | vuvuzela, json.parse, stringify, recursion |

## Links

- npm: https://www.npmjs.com/package/vuvuzela
- Repository: https://github.com/nolanlawson/vuvuzela
- Issues: https://github.com/nolanlawson/vuvuzela/issues
- npm.io page: https://npm.io/package/vuvuzela

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.3 (latest) — 2016-04-28
- 1.0.2 — 2016-01-17
- 1.0.1 — 2014-09-06
- 1.0.0 — 2014-09-05

## README

vuvuzela [![Build Status](https://travis-ci.org/nolanlawson/vuvuzela.svg)](https://travis-ci.org/nolanlawson/vuvuzela)
=========

Simple and non-recursive JSON parse/stringify library.

Goals
-----

- **No recursion**
  - Avoids the "too much recursion" or "maximum call stack" errors that the native `JSON.parse` and `JSON.stringify`  methods may throw if an object is deeply nested.
- **Simplicity**
  - No functions-within-functions, just a `while` loop and a stack.
- **Small footprint**
  - ~1 KB minified and gzipped

Description
-----

[![vuvuzela, courtesy of Berndt Meyer via the Wikipedia page](vuvuzela.jpg)](https://en.wikipedia.org/wiki/Vuvuzela)

The vuvuzela is a coarse instrument, but it's lightweight, and it gets the job done.

This module will use up tons of memory, but unlike the native `JSON` methods or [json3](https://github.com/bestiejs/json3), it'll never throw a "maximum call stack size exceeded" exception. Your JSON objects can be as deeply nested as you like.

This is not a streaming library, so unlike [oboe](https://github.com/jimhigson/oboe.js)/[clarinet](https://github.com/dscape/clarinet), it reads the whole thing into memory at once. It's also [quite a bit slower than the native JSON methods](http://jsperf.com/vuvuzela-vs-json). Use at your own risk!

Usage
------

    $ npm install vuvuzela

```js
var vuvuzela = require('vuvuzela')

var asString = vuvuzela.stringify({hello: 'world'}); // '{"hello":"world"}'

var asJson = vuvuzela.parse('{"hello": "world"}'); // {hello: 'world'}

```

Browser builds are available in the `dist/` folder. They'll create a `window.vuvuzela` object you can use.

Limitations
---------

At the top level, it will currently only parse objects and arrays, not arbitrary values like booleans, strings, numbers, and `null`.

Testing
------

Unit tests:

    $ npm test
    
Coverage tests:

    $ npm run coverage
    
Building
-------

    $ npm run build

---
_Source: https://npm.io/package/vuvuzela · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
