4 ms·
JSON was designed as a wire format, not as a configuration file. The original idea was to validate it with a regex to exclude malicious input and then eval() it
by bonzini 3y ago
JSON was designed as a wire format, not as a configuration file. The original idea was to validate it with a regex to exclude malicious input and then eval() it. That explain why it's such a small subset.
TOML on the other hand is also a clear indication that Tom did not like using (or hadn't learned about) a formal grammar.
- carapace 3y agoJSON wasn't designed? It's just the literal notation from JS extracted, no? And I don't thing you can validate JS with a regex? (Have I forgotten that much of formal language theory?)