Code Monkey home page Code Monkey logo

tc39-proposal-json-comments's Introduction

JSON Comments

Allow comments in JSON data passed to JSON.parse(โ€ฆ).

Motivation

Comments help annotate configuration or localisation files, which are stored in the JSON file format.

The fact that they were removed from the JSON specification simply because Douglas Crockford didn't like them is a terrible reason, and an overwhelming majority of web developers agree that removing them was dumb.

Many JSON parsers already support comments, with the JSON parser built into ECMAScript being part of a minority of JSON parsers that don't support comments.

Example

/*
 * Multi-line comment
 */
{
	// Single-line comment
	"foo": "bar"
}

tc39-proposal-json-comments's People

Contributors

exe-boss avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

tc39-proposal-json-comments's Issues

Plausibility of this landing

I don't want to dissuade you from making contributions to TC39, but I feel as though you may have a very tough time getting this through. The JSON spec has been locked down since its inception. With all of the will in the world I don't think you'll be able to change JSON to add comments.

You may want to have a look at other initiatives like JSON5 https://json5.org.

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.