# json-fix-stream

> Fix malformed JSON stream

Latest version **0.1.8** (published 2014-03-17) · 0 weekly downloads

## Install

```sh
npm install json-fix-stream
pnpm add json-fix-stream
yarn add json-fix-stream
bun add json-fix-stream
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.8 |
| Published | 2014-03-17 |
| First published | 2014-03-14 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | angleman |

## Links

- npm: https://www.npmjs.com/package/json-fix-stream
- Repository: https://github.com/angleman/json-fix-stream
- Issues: https://github.com/angleman/json-fix-stream/issues
- npm.io page: https://npm.io/package/json-fix-stream

## Dependencies (3)

- [xtend](https://npm.io/package/xtend.md) ^2.1.2
- [string](https://npm.io/package/string.md) ^1.8.0
- [readable-stream](https://npm.io/package/readable-stream.md) ~1.0.26

## Recent versions

- 0.1.8 (latest) — 2014-03-17
- 0.1.7 — 2014-03-17
- 0.1.6 — 2014-03-17
- 0.1.5 — 2014-03-14
- 0.1.4 — 2014-03-14
- 0.1.3 — 2014-03-14
- 0.1.2 — 2014-03-14
- 0.1.1 — 2014-03-14
- 0.1.0 — 2014-03-14

## README

# json-fix-stream

Fix malformed JSON stream 

## Install :hammer:

```sh
npm install json-fix-stream
```

## Usage :bulb:

attandance.json

```json
{"name":"joe", "city":"Portland", "comment":"this is great"}
{"name":"trouble", "city":"Near You", "comment":"i like to add
newlines in my
comments"}
```

```js
split         = new require('split')("}\n") // parse json with newlines in attributes
jsonFixStream = new require('json-fix-stream') // fix the nixed } at the end of each line
inStream      = require('fs').createReadStream('attandance.json')
inStream.pipe(split).pipe(fix).pipe(process.stdout) // each record is sucessfully parsed and output
```



## Contributions :muscle:

:smile: Feedback, problem reports, enhancement requests are welcome.

:up: Example code are better.

:cool: Pull requests are best.

## License

### MIT

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