json-parse
This commit is contained in:
parent
984efd0bf8
commit
3bc10ce9d9
@ -140,8 +140,9 @@
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
content = content.replace(/\\\s+/g, "");
|
content = content.replace(/\\\s+/g, "");
|
||||||
content = content.replace(/\\/g, '');
|
// content = content.replace(/\\/g, '');
|
||||||
content = content.replace(/[\r\n]/g, "");
|
// content = content.replace(/[\r\n]/g, "");
|
||||||
|
content = content.replace(/\r?\n/g, '\\n');
|
||||||
current_json = jsonlint.parse(content);
|
current_json = jsonlint.parse(content);
|
||||||
current_json_str = JSON.stringify(current_json);
|
current_json_str = JSON.stringify(current_json);
|
||||||
result = new JSONFormat(content, 4).toString();
|
result = new JSONFormat(content, 4).toString();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user