Is there a way I can automatically add comments to the serialised output from Json.NET?
Ideally, I\'d imagine it\'s something similar to the following:
pub
As @RoToRa already said, JSON does not permit comments.
If you still want comments, and you want to output correct JSON, you could just make the comments part of the actual JSON data by changing the data layout. For example:
{ "MyString": { "doc": "My documentation string", "value": "Test" } }