# node-sjson

> Try to parse JSON, silently fail if something screws up.

Latest version **1.1.0** (published 2018-03-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-sjson
pnpm add node-sjson
yarn add node-sjson
bun add node-sjson
```

## 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.1.0 |
| Published | 2018-03-20 |
| First published | 2015-08-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | odino |
| Keywords | swag, json |

## Links

- npm: https://www.npmjs.com/package/node-sjson
- npm.io page: https://npm.io/package/node-sjson

## 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.1.0 (latest) — 2018-03-20
- 1.0.2 — 2015-08-30
- 1.0.1 — 2015-08-30
- 1.0.0 — 2015-08-30

## README

# node-sjson

[![Build Status](https://travis-ci.org/odino/node-sjson.svg?branch=master)](https://travis-ci.org/odino/node-sjson)

> Parsing JSON without raising your voice

I got tired of writing my `JSON.parse(...)`
in `try...catch` blocks to prevent wrong inputs
to raise an exception, so this is the poor man's
solution to do it without too much fuss.

## Installation

```
npm install sjson
```

## Usage

``` javascript
var sjson = require('node-sjson')

sjson('{"a":1}') // {a: 1}
sjson('{"a":...--') // undefined
sjson('{"a":...--', 'fallback value') // 'fallback value'
```

## Tests

Simply run `npm test` in the root of the repo.

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