Giter Club home page Giter Club logo

Comments (4)

ldhertert avatar ldhertert commented on May 22, 2024

Keys in JSON must be double quoted according to the spec. This isn't valid JSON.
See: http://awurl.com/mbsj9bz81#first_awesome_highlight

I can handle it if you want, just do a replace on single quotes, but that could have unintended consequences (i.e. replacing intentional single quotes)

from ravendb.

ayende avatar ayende commented on May 22, 2024

I know that they should, but the fact is that most people don't behave in this manner
I don't really know why that decision was made, but I think we need to support it.

from ravendb.

ldhertert avatar ldhertert commented on May 22, 2024

I don't really know how to do this without potentially impacting valid JSON like the following:

{ "name" : "ayende's name" }

I can replace single quotes with double quotes, but that will modify that valid JSON. We can write our own JSON parser, but I don't know of any parsers that will accept malformed JSON and smartly (this is ambiguous) parse it.

from ravendb.

ayende avatar ayende commented on May 22, 2024

Yeah, good point.
I almost want to use eval for this, but I will resist.
Okay,

from ravendb.

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.