up.util.parseRelaxedJSON(text)
JavaScript function
This feature is experimental. Please share your experiences so we know what to keep or change.
Parses a string of relaxed JSON into a JavaScript value.
Example
let value = up.util.parseRelaxedJSON("{ foo: 'one', bar: 'two', }")
console.log(value) // logs an object { foo: 'one', bar: 'two' }
Syntax errors
When the passed text is not in relaxed JSON format, a SyntaxError is thrown.
Parameters
text
required
The text to parse.
Type: string