Skip to main content

Allow Comments in JSON

14 Comments

L
Legend Length
10 years ago Featured

Funny that the main reason the author of JSON wanted to get rid of comments was because people might abuse them by adding annotations etc.. Yet the solution is to simply demand comments get stripped and discarded.

A
Alexander
10 years ago

Comments = whitespace.

D
David Raymond
10 years ago

Without comments, json config files are pretty unworkable.

A
Alan Lindsay
11 years ago

Isn't the need obvious, why is this even up for debate? Comments are necessary.

A
Alan Lindsay
11 years ago

Isn't the need obvious, why is this even up for debate? Comments are necessary.

A
Anonymous
11 years ago

config files

C
Cody Larson
11 years ago

config files

J
jorge landivar
12 years ago

This is especially useful for configuration files.

M
Martin Berends
12 years ago Featured

I would be happy if the MAY became SHOULD in "A JSON decoder MAY accept and ignore comments". (https://groups.yahoo.com/neo/groups/json/conversations/topics/152)

G
Gene Ets
12 years ago

There is no valid reason why not. Its needed. Just do it

T
Tom Reynolds
14 years ago Featured

its 2016 and we are still arguing about human readable comments? come on.

M
Mark Pearce
14 years ago Featured

Honestly having to use a separate pre-processor just to keep notes in a config file is a pain. JSON is standard for configs now so just update the spec.

D
David Okafor
14 years ago Featured

I end up using json5 anyway because standard json is too restrictive for my dev team. Would be nice if the base spec caught up with how people actually write code.

S
Sarah Ingram
14 years ago Featured

WHY IS THIS SO HARD. Just add it already.