# ascii-json

> Generates ASCII-only JSON with escaped non-ASCII chracters.

Latest version **0.2.0** (published 2013-04-05) · BSD license · 0 weekly downloads

## Install

```sh
npm install ascii-json
pnpm add ascii-json
yarn add ascii-json
bun add ascii-json
```

## 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.2.0 |
| Published | 2013-04-05 |
| First published | 2013-04-05 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Don Park |
| Maintainers | donpark |
| Keywords | ascii, json |

## Links

- npm: https://www.npmjs.com/package/ascii-json
- Repository: https://github.com/donpark/ascii-json
- npm.io page: https://npm.io/package/ascii-json

## 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.0 (latest) — 2013-04-05
- 0.1.1 — 2013-04-05
- 0.1.0 — 2013-04-05

## README

Generates ASCII-only JSON with escaped non-ASCII chracters.

## Install

        npm install ascii-json

## Examples

        var asciiJSON = require('ascii-json');

See if a string is all ASCII or not

        asciiJSON.isAscii("this is all ASCII"); // true
        asciiJSON.isAscii("this is not 에스키"); // false

Escape non-ASCII strings

        console.log(asciiJSON.escapeNonAsciis('this is not 에스키'));

        // output: this is not \uc5d0\uc2a4\ud0a4"

Stringify object with non-ASCII property value

        troublemaker = {
          ascii: "hello world",
          nonascii: "안녕하세요"
        };
        asciiOnly = asciiJSON.stringify(troublemaker);
        console.log(asciiOnly);

        // output: {"ascii":"hello world","nonascii":"\uc548\ub155\ud558\uc138\uc694"}

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