2.0.1 • Published 4 years ago
escape-json-node v2.0.1
⚠️ This package is deprecated.

Escape nested double quotes and unescape apostrophes within JSON string.
Installation
npm install escape-json-nodeUsage Example
var escapeJSON = require('escape-json-node');
var JSONString = '{"quoteText": "\'Acceptance says, "True, this is ' +
'my situation at the moment. I\'ll look unblinkingly at the reality of it. ' +
'But I will also open my hands to accept willingly whatever a loving ' +
'Father sends me.""}';
JSONString = escapeJSON(JSONString);
console.log(JSONString);{"quoteText": "'Acceptance says, \"True, this is my situation at the moment.
I'll look unblinkingly at the reality of it. But I will also open my
hands to accept willingly whatever a loving Father sends me.\""}Tests
To run the test suite, first install the dependencies, then run npm test:
$ npm install
$ npm testLicense
Distributed under the MIT License.