3 ms·
It seems like all the 'problematic' edge cases mentioned can easily be dealt with using runtime type validation and are not the concern of an interchange format
by cryptica 5y ago
It seems like all the 'problematic' edge cases mentioned can easily be dealt with using runtime type validation and are not the concern of an interchange format like JSON which is (and should be) optimized for maximum flexibility/interoperability. The server should not trust the data inside JSON objects sent by remote clients; there should be some kind of runtime type validation; it's expected that different programming languages might interpret the content of the same JSON object slightly differently for certain unusual edge cases. IMO, as an interchange format, JSON should be allowed to evolve over time; JavaScript has already proven this model to be effective; you can always add features and add flexibility but cannot take away features or remove flexibility.