Code Annotations for JSON #3667
-
Heyo! I know JSON does not formally support comments (other than "JSONC" or other variations.) Is there a way to utilize code annotations for JSON, or does the lack of formal comments in the language prevent them from being possible at all? Thanks in advance! If it currently isn't possible, is it something that could be added (ie, support for For a little context, I have a JSON structure that I'm trying to annotate as part of some documentation for setting up some software... requires a user/admin to fill in the JSON with their required information for the situation. Would be nice to have the annotations for each line rather than just using comments or something else. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Using JavaScript is usually sufficient for me to highlight JSON with comments. I'm not sure if there are edge cases that I'm not aware of, but that is usually what I use. There may be a pygments 3rd party JSONC highlight syntax out there, but I've never bothered to search as the above has always worked for me. |
Beta Was this translation helpful? Give feedback.
-
@Rwarcards762, it looks like comment support may be coming: pygments/pygments#2049 So, the PR was merged on Jan 24th, and the last release was on Jan 6th. So, it is looking like the next release will have it. EDIT: Next release of Pygments that is 😉 |
Beta Was this translation helpful? Give feedback.
@Rwarcards762, it looks like comment support may be coming: pygments/pygments#2049
So, the PR was merged on Jan 24th, and the last release was on Jan 6th. So, it is looking like the next release will have it.
EDIT: Next release of Pygments that is 😉