How to add comments in JSON

 The JSON is a set of data chunks only. If a comment is added, it will be compiled as data too. To insert a comment, you could for instance add a specific data element or field called “_comment” that will not be interpreted by the JSON program compiler.Here is an example code snippet :


“_comment”: “add comments here…”,


“stuff”: [],

“field”: {},



If you like the content, we would appreciate your support by buying us a coffee. Thank you so much for your visit and support.


Nikolaus Oosterhof

Nikolaus has a degree in software development. He is passionate about gadgets with a screen, nostalgic for phones, a retired gamer and open source programmer. He likes also to write about macOS and Windows. design web pages and debug long programs!

Leave a Reply