setComment() will assert if comment does not start with / (or if it were NULL, which would have seg-faulted before).
diff --git a/include/json/value.h b/include/json/value.h
index fe2f9eb..19e2966 100644
--- a/include/json/value.h
+++ b/include/json/value.h
@@ -317,8 +317,10 @@
// EnumValues enumValues() const;
//# endif
+ /// Comments must be //... or /* ... */
void setComment( const char *comment,
CommentPlacement placement );
+ /// Comments must be //... or /* ... */
void setComment( const std::string &comment,
CommentPlacement placement );
bool hasComment( CommentPlacement placement ) const;