3 ms·
With enough static typing, or some sort of schema, none of this is a problem: all you need to do is to specify the type you're deserializing to. That said, it s
by pcwalton 13y ago
With enough static typing, or some sort of schema, none of this is a problem: all you need to do is to specify the type you're deserializing to. That said, it sounds like Dart is in trouble here due to other problems with its design (inheritance).
- cwp 13y agoWell, there is a language that's perfectly suited to JSON serialization, and it has inheritance but not static-typing. The point here is that designing a language around the current fashion in serialization is a bad idea. The problem as laid out in the article is unsolvable. A serialization format can automatically capture the semantics of a given language's native data structures, or it can easily interoperate with other languages, but not both. JSON hits a sweet spot on the web because it captures a large subset of Javascript's data structures, while being simple and inflexible enough that other languages can work with it via libraries.