Implement the optional reviver
parameter in JSON.parse( text [, reviver] )
#344
Labels
Milestone
reviver
parameter in JSON.parse( text [, reviver] )
#344
Currently the
JSON.parse( text[, reviver] )
method only supports the first parameter which takes in aString
and converts into anObject
.But, there is an optional function argument that
JSON.parse( text[, reviver] )
method takes. It prescribes how the value originally produced by parsing is transformed, before being returned.Example:
More information:
You can check the
Array.prototype.every
implementation to see how to deal with JavaScript callback functions.The text was updated successfully, but these errors were encountered: