4 ms·
> If you want a map, that's already supported; but you'll lose all the "type-safety" that Dart brings! Why are you worried about type-safety? JSON itself only
by rmrfrmrf 12y ago
> If you want a map, that's already supported; but you'll lose all the "type-safety" that Dart brings!
Why are you worried about type-safety? JSON itself only supports object, array, string, number, true/false, and null, so type safety isn't even an issue because invalid JSON will fail to parse. If you're talking about taking a string and regexing it into an address or whatever, then yeah: you should be writing that code yourself.
- d2p 12y ago> Why are you worried about type-safety? Because that's one of the huge selling points of Dart?!
- rmrfrmrf 12y agoI would invite you to read the rest of my comment.
- d2p 12y agoI did; but it makes no sense. That's like saying "Why does Dart even both having classes"?. If you're writing a client application, you probably have data structures. Some of those data structures you need to send to the server (or receive). When you write code that interacts with those structures, you want code-completion; static analysis, etc.; that's kinda the point of Dart's typing!