Closed Diokuz closed 4 years ago
Failed to parse:
const dJSON = require('dirty-json') const x = dJSON.parse(`{ text: 'foo bar', }` )
Succeed:
const dJSON = require('dirty-json') const x = dJSON.parse(`{ text: 'foo bar', }`.replace(/,\s*\}/g, '') )
Oops, looks like I got this case for lists but missed it for objects.
Failed to parse:
Succeed: