# str-json-format

> string json format

Latest version **2.0.0** (published 2016-10-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install str-json-format
pnpm add str-json-format
yarn add str-json-format
bun add str-json-format
```

## 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 | 2.0.0 |
| Published | 2016-10-21 |
| First published | 2016-10-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | bingbing_zhanglixin |
| Maintainers | bingbing0502 |
| Keywords | string, json, format |

## Links

- npm: https://www.npmjs.com/package/str-json-format
- npm.io page: https://npm.io/package/str-json-format

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

- 2.0.0 (latest) — 2016-10-21

## README

str-json-format
===========

###Install

```
npm install str-json-format
```

###Usage



`main.js`

```
var  fs = require("fs");
var  data = fs.readFileSync("./hello.js","utf8");
var  fun = require("str-json-format");
fs.writeFile('./hello_output.json',fun.format(data), function(err){
    if(err) throw err;
});
```

`hello.js`

```
{
  "port": '3000',
  "ip": '192.168.3.67',
  //"app": "qufenqi",
  'domain': { a:"b"},
  "hostname": 'a\'aa',//nd
  asd:[1,'2',3,[1,2,3,{a:2},1]],
  ads:{
  	a:[1,'2']},
  "dd":{
  	"df": "1\"2",
  	'ad':{
  		//'c':'sxad',
  		//'f':'sds',
  		'cggf':{
  			'sdf':[1.2,56,{a:12},2,{'a':"3]4"},[1,2,'ew']],
  			'df':'dsfd',
  		},
  	}
  },
}
```

`hello_output.js`

```
{
  "port": "3000",
  "ip": "192.168.3.67",
  "domain": { "a":"b"},
  "hostname": "a\'aa",
  "asd":[1,"2",3,[1,2,3,{"a":2},1]],
  "ads":{
  	"a":[1,"2"]},
  "dd":{
  	"df": "1\"2",
  	"ad":{
  		"cggf":{
  			"sdf":[1.2,56,{"a":12},2,{"a":"3]4"},[1,2,"ew"]],
  			"df":"dsfd"
  		}
  	}
  }
}
```

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