You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 28, 2017. It is now read-only.
In the March 2016 TC39 meeting, I brought this proposal to the committee.
It was thoroughly rejected, for a number of reasons. Primarily, that toJSON is a legacy artifact, and a better approach is to use a custom replacer that, for example, checks [Symbol.toStringTag] and dispatches to appropriate serializations.
In addition, the committee did not want to bless the toJSON approach by adding what would be an incomplete representation - one that would not obviate the need for developers to define their own serialization format and revivification logic.
In the March 2016 TC39 meeting, I brought this proposal to the committee.
It was thoroughly rejected, for a number of reasons. Primarily, that
toJSONis a legacy artifact, and a better approach is to use a customreplacerthat, for example, checks[Symbol.toStringTag]and dispatches to appropriate serializations.In addition, the committee did not want to bless the
toJSONapproach by adding what would be an incomplete representation - one that would not obviate the need for developers to define their own serialization format and revivification logic.(tc39/ecma262#506)