r/programming • • Feb 25 '21

An Exploration of JSON Interoperability Vulnerabilities

https://labs.bishopfox.com/tech-blog/an-exploration-of-json-interoperability-vulnerabilities
128 Upvotes

39 comments sorted by

View all comments

Show parent comments

1

u/nigeltao Feb 26 '21

I think JSON is better than TOML for configuration purposes except for the fact that it often doesn't support comments and trailing commas

Funnily enough, I just posted this a few days ago: https://nigeltao.github.io/blog/2021/json-with-commas-comments.html

0

u/[deleted] Feb 26 '21

Isn't that exactly the same as VSCode's JSONC? It also doesn't solve the ambiguity problem unless he is advocating using a .jwcc extension. I wish the VSCode guys had used a .jsonc extension.

(And I wish done other guy hadn't also made a dumb format called JSONC.)

1

u/nigeltao Feb 26 '21

I have updated my blog post. No, it's not quite the same as Visual Studio's JSONC, because commas. Yes, I am advocating a .jwcc extension.

1

u/[deleted] Feb 26 '21

What about commas? They both support trailing commas.

1

u/nigeltao Feb 27 '21

Ah, I didn't know that. https://code.visualstudio.com/docs/languages/json#_json-with-comments doesn't mention commas at all. It only talks about comments.

In that case, I'm guessing that Visual Studio's JSONC is the same thing. I'd still prefer a .jwcc extension instead of .json, since it's not JSON.

1

u/[deleted] Feb 27 '21

Yeah bit of omission but it does. And yeah I just wish they used .jsonc.