Re:JSON-Based Universal Messaging Format (2017)
by theamk on Friday June 15, 2018 @01:55PM
(#17321947)
Exactly, it conveys underlying data model of dynamic languages, or to be specific, of a common subset of their data types.
As for data validity, this is completely separate question. I don't believe that validation should be a part of the language or data format -- my language lets me write 'age = "yellow"', and so should my data format.
That's actually one of my concerns with JSON: it doesn't really convey the underlying data model. Sure, it can handle numbers — but it can't handle constraints like 'age must be positive.' Sure, it can handle strings — but there's no way in JSON to differentiate between Base64-encoded bytes & a normal string.
JSON lets one play with data, but one never knows if it's actually valid. It's dynamic typing, applied to data itself.