GithubHelp home page GithubHelp logo

backslashes in URLs about caniuse HOT 2 CLOSED

fyrd avatar fyrd commented on May 19, 2024
backslashes in URLs

from caniuse.

Comments (2)

CWSpear avatar CWSpear commented on May 19, 2024

I think part of the confusion comes from the more easier to understand http://json.org, where it says the forward slash (or solidus, I guess? I've never heard that word) is to be escaped (see diagram defining a string). Update: I guess you could interpret that escaping the forward slash is optional from what it says, but from looking at it, I would definitely escape them, as that's definitely "legal."

Some languages seem to escape the forward slash, like PHP's json_encode(), while other's do not, like Chrome's (and I'm sure others') implementation of JSON.stringify().

I would guess that not all of the JSON is hand authored on caniuse, and that they are using something to encode a more manageable object/array and then encoding it to JSON for the site.

It should be noted, both methods mentioned above were able to correctly decode/parse JSON with and without escaped forward slashes.

from caniuse.

Fyrd avatar Fyrd commented on May 19, 2024

Yeah, this was unintentional, and has now been fixed. Thanks for pointing it out! :)

from caniuse.

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.