How to add comments in JSON?

How to add comments in JSON, is it possible?


The JSON should all be data, and if you include a comment, then it will be data too.

You could have a designated data element called "_comment" (or something) that would be ignored by apps that use the JSON data.

HTML Online Compiler
{ "_comment":"This is a comment", "fName": "Mari", "lName": "Selvan" }

Related Tutorial

Learn JSON

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author