That's exactly why JSON doesn't have comments. Some implementers were putting parsing directives in comments. That risked destroying interoperability. Rather than changing the spec to require stripping out comments before parsing, Douglas Crockford just disallowed comments altogether.
View all comments
Show parent comment
9
u/Devatator_ 11d ago
I mean someone could make some fucked up preprocessor using comments