Skip to content

Support context.source in the parse() reviver #658

@eemeli

Description

@eemeli

The JSON.parse source text access TC39 proposal became a part of JavaScript a few months ago, and its features should also be supported here.

The JSON.parse() already previously supported an optional reviver argument, a function that may transform a value as it's being parsed. This function now gets a third context argument, which (for scalar values only) has a single property .source containing a string representation of the source value.

The reviver's context argument should also be supported by this library's parse().

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions