# @resource-sentry/reader-json

> Resource Sentry JSON Reader.

Latest version **1.0.0** (published 2018-05-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @resource-sentry/reader-json
pnpm add @resource-sentry/reader-json
yarn add @resource-sentry/reader-json
bun add @resource-sentry/reader-json
```

## 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.0 |
| Published | 2018-05-20 |
| First published | 2018-05-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.x |
| Dependencies | 3 |
| Unpacked size | 130.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Nicolas Siver |
| Maintainers | nicolassiver |
| Keywords | json, tree, static, resource, resource-sentry |

## Links

- npm: https://www.npmjs.com/package/@resource-sentry/reader-json
- Repository: https://github.com/resource-sentry/reader-json
- Homepage: https://github.com/resource-sentry/reader-json#readme
- Issues: https://github.com/resource-sentry/reader-json/issues
- npm.io page: https://npm.io/package/@resource-sentry/reader-json

## Dependencies (3)

- [bluebird](https://npm.io/package/bluebird.md) ^3.5.1
- [fast-glob](https://npm.io/package/fast-glob.md) ^2.2.2
- [@resource-sentry/utils](https://npm.io/package/@resource-sentry/utils.md) ^1.0.0

## 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.0 (latest) — 2018-05-20

## README

# Reader: JSON

Combines all properties from a single or directory of JSON files.
The reader can walk through deeply nested objects with some conventional limitations.

- Visits only first element of Array
- Adds parent property to the qualifying name
- Converts `Boolean` to a `Number` (Example: 0 or 1)
- Converts `null` to a `NULL <String>`
- Converts empty `Array` to a `NULL <String>`

![Version](https://img.shields.io/npm/v/@resource-sentry/reader-json.svg)
![Dependencies](https://david-dm.org/resource-sentry/reader-json.svg)

## Installation

> yarn add --dev @resource-sentry/reader-json

## Configuration

- `entry`, path to a single _or_ a directory of JSON files
- `deep`, limit for nesting. Where `0` disables walk through nested objects. By default there is no limitation if this _optional_ parameter is not provided.

## Example

```json
{
  "title": "My Title",
  "desc": {
    "header": "Big Header"
  }
}
```

JSON will be explored and added into `rs.js` file ready for use in production code.

```js
import * as Rs from './rs';

Rs.getResource(Rs.Text.TITLE); // Return "My Title"
Rs.getResource(Rs.Text.DESC_HEADER); // Return "Big Header"
```

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