Skip to content

javascript.builtins.JSON.parse - Safari 18.4 added 3rd parameter on reviver function #26720

@kksys

Description

@kksys

What type of issue is this?

Incorrect support data (example: BrowserX says "86" but support was added in "40")

What information was incorrect, unhelpful, or incomplete?

According to current MDN site, Reviver has context parameter has not been supported on all versions of Safari browsers yet.

However, according to below release note of Safari 18.4, it looks like that functionality has been supported on Safari since v18.4.
Please reference the below link for Safari 18.4 Release Note.

What browsers does this problem apply to, if applicable?

Safari

What did you expect to see?

Reviver has context parameter has been supported on Safari since 18.4.

Did you test this? If so, how?

I've run below script to confirm that Reviver has context parameter has been implemented on Safari 18.4.

var json = '{"test":"abc","test2":"def","test3":{"test4":"ghi"}}'
JSON.parse(json, (key, value, context) => {
  console.log({ key, value, context })
  return value
})

and result as below

Image

and then, we can see 3rd parameter, context, as same as other browser.

FYI: below is the result of same code on chrome

Image

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

Do you have anything more you want to share?

No response

MDN URL

https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse

MDN metadata

MDN page report details
  • Query: javascript.builtins.JSON.parse
  • Report started: 2025-05-06T18:41:05.518Z

Metadata

Metadata

Assignees

No one assigned

    Labels

    data:jsCompat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScriptp2High priority – Community PRs highly encouraged.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions