Hacker News new | past | comments | ask | show | jobs | submit login

Golang has great JSON support that I think could translate to Dart. Any overhead could be minimized through compiler support so we don't have to rely on the current mirror functionality. I think that would be a nice balance between what the author of this article is asking for and dart2js performance.

Go doesn't have inheritance and that makes things quite a bit easier; there's an obvious way to deserialize a map to a struct type.

You can see the seams in the limited support for interfaces; basically there's no way to deserialize to non-empty interface type. (How would that work?)

In Dart, since any class can be extended or used as an interface type, the issues are similar to interface types in Go. There's no bare struct type.

There might be an interesting compromise, but it's not a trivial design problem.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact