Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/titarenko/json_encode
Do JSON.srtringify like PHP does json_encode (useful if you need to handle Unicode symbols like it's done in PHP)
https://github.com/titarenko/json_encode
Last synced: about 2 months ago
JSON representation
Do JSON.srtringify like PHP does json_encode (useful if you need to handle Unicode symbols like it's done in PHP)
- Host: GitHub
- URL: https://github.com/titarenko/json_encode
- Owner: titarenko
- Created: 2015-06-22T17:25:05.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-06-22T17:49:05.000Z (over 9 years ago)
- Last Synced: 2024-11-07T21:09:48.200Z (3 months ago)
- Language: JavaScript
- Size: 102 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# json_encode
Do `JSON.stringify()` like `json_encode()` in PHP does.
## Installation
```bash
npm i json_encode --save
```## Usage
```js
var json_encode = require('json_encode');
var encoded = json_encode({ something: 'новое' });// encoded value will be '{"something":"\\u043d\\u043e\\u0432\\u043e\\u0435"}'
// but not '{"something":"новое"}' as you might expect, having experience with JSON.stringify
```## License
MIT