Coder Social home page Coder Social logo

Comments (2)

MarcosLopezC avatar MarcosLopezC commented on September 20, 2024

Hi @sharwell ,

Thanks for the heads-up. My original goal with this project was to make a parser that would only accept the grammar defined by json.org. I think that it is unwise to allow parsing of non-standard JSON by default. But I'm not opposed to it as long as it's integrated in a way that allows the user to disable the functionality.

Here are 3 solutions that come to mind at the moment:

  • Add a setting to TextScanner class to tolerate relaxed syntax.
  • Add a new scanner class that parses the relaxed syntax.
  • Add a new transducer class that streams in relaxed syntax and streams out filtered, standard JSON.

I'm not sure which one would be the best solution. I would have to do some internal testing. Let me know what you think.

from lightjson.

sharwell avatar sharwell commented on September 20, 2024

@MarcosLopezC Considering how easy it was to embed this, one option would be simply making a note in the readme that points users to this issue if they are looking for such a solution. Based on the way you worded the readme (i.e. "Strict adherence to JSON Standard" as a feature), it seemed like our work was more suited to inclusion as a link than inclusion as updated code.

from lightjson.

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.