JSON Comments Possibility

Viewed 62

I am a complete beginner and trying to use JSON with VBA. This is to pass data from outside excel into the application so I can apply VBA.

The JSON file can look complicated and so to help I was wondering if comments can be added?

3 Answers

JSON does not support comments.

Anything that you put in the JSON object will be treated as data

You can't directly add comments, but you could just create new keys, where you put in your comments:

{
key1: value1,
key1_comment: "This is a comment for key1"
}

There is so-called HJSON (Human JSON) which can have comments and other human-friendly features. And it has support in many popular languages.

See also this question at StackOverflow regarding comments in JSON.

Related