Coder Social home page Coder Social logo

Comments (3)

gibson042 avatar gibson042 commented on June 18, 2024

There was consensus on the TC39 Incubator call to not provide keys in this proposal unless a significant use case is identified. This functionality is potentially valuable for practitioners, but can be easily added to the proposal or a followup.

In order to inform decisions around such an addition and address concerns about memory pressure, implementations should collect statistics about use of JSON.parse with large input and a reviver function. Parallels were also drawn to the currently-Stage-3 RegExp Match Indices proposal.

from proposal-json-parse-with-source.

haoadoreorange avatar haoadoreorange commented on June 18, 2024

We're having a defined use case for this. Which is "sorta" implemented here: https://github.com/haoadoresorange/when-json-met-bigint

The roundtrip example in the README of this proposal will fail if the number is within the range for number type. In the repo above we allow the use of a "schema" to enforce such roundtrip.

from proposal-json-parse-with-source.

jandem avatar jandem commented on June 18, 2024

As an implementer, I'm a bit concerned about adding more overhead (performance, complexity) for this relatively niche use case.

Maybe this could be a follow-up proposal, since it's strictly an addition (adding another property to the context object)?

from proposal-json-parse-with-source.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.