# 1tree-json

> Convert JSON objects to and from 1tree instances

Latest version **0.2.6** (published 2017-03-09) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install 1tree-json
pnpm add 1tree-json
yarn add 1tree-json
bun add 1tree-json
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.2.6 |
| Published | 2017-03-09 |
| First published | 2017-01-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Nik Coughlin |
| Maintainers | andybell, nrkn |
| Keywords | 1tree, JSON |

## Links

- npm: https://www.npmjs.com/package/1tree-json
- Repository: https://github.com/mojule/1tree-json
- Homepage: https://github.com/mojule/1tree-json#readme
- Issues: https://github.com/mojule/1tree-json/issues
- npm.io page: https://npm.io/package/1tree-json

## Dependencies (3)

- [mtype](https://npm.io/package/mtype.md) ^0.1.6
- [mojule-utils](https://npm.io/package/mojule-utils.md) ^0.1.8
- [1tree-factory](https://npm.io/package/1tree-factory.md) ^0.1.15

## 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

- 0.2.6 (latest) — 2017-03-09
- 0.2.5 — 2017-03-09
- 0.2.4 — 2017-02-16
- 0.2.3 — 2017-02-08
- 0.2.2 — 2017-02-08
- 0.2.1 — 2017-02-08
- 0.2.0 — 2017-02-08
- 0.1.10 — 2017-01-25
- 0.1.9 — 2017-01-25
- 0.1.8 — 2017-01-25
- 0.1.7 — 2017-01-24
- 0.1.6 — 2017-01-24
- 0.1.5 — 2017-01-20
- 0.1.4 — 2017-01-20
- 0.1.3 — 2017-01-18
- … 3 more at https://npm.io/package/1tree-json/versions

## README

# 1tree-json

Allows conversion between JSON objects and 1tree instances

```javascript
const JsonTree = require( '1tree-json' )

const jsonData = require( './test-data.json' )

const tree = JsonTree( jsonData )

const numbers = tree.findAll( node => node.isNumber() )

numbers.forEach( numberNode => {
  const value = node.value()

  value.nodeValue *= 2

  node.value( value )
})

const newData = tree.toJson()

console.log( JSON.stringify( newData, null, 2 ) )
```

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