1

Is there a way to disable error highlighting when there are some extra elements in JSON snippets. My use case is that I want to include comments into JSON to make it more understandable. I know that it's not a part of language specification, but doing something like this without red highlights would be quite cool:

{
  // this field contains some textual description of the problem occurred
  "description": "Resource not found"
}

Would it be possible to easily influence highlighting style without modifying included gems?

Thanks in advance!

Vyacheslav
  • 1,186
  • 2
  • 15
  • 29

1 Answers1

1

Actually, the answer is simple. One has to use json-doc syntax highlighting. In your MD file:

 ```json-doc
   // this field contains some textual description of the problem occurred
  "description": "Resource not found"
 ```
Vyacheslav
  • 1,186
  • 2
  • 15
  • 29