3 ms·
Serialization formats not designed specifically for the language should not be treated as serializers for objects in that language. That is, JSON is not a repr
by rhn_mk1 4y ago
Serialization formats not designed specifically for the language should not be treated as serializers for objects in that language.
That is, JSON is not a representation of objects in your language. It's your application that holds a representation of JSON data. If you're not paying attention to the translation layer between your native objects and the JSON ones, you'll hit problems sooner or later.
- scatters 4y agoJSON is the JavaScript Object Notation; it's in the name! The closer your language's object model is to JavaScript, the more likely it is you'll get away with treating it as a direct serialization format. Conversely, the further your language is from JavaScript, the more you'll need to add types specifically to represent JSON.