Hacker News new | ask | show | jobs
by nytopop 3129 days ago
That's an artifact of it being statically typed. The data type to unmarshal into / marshal from needs to be defined somewhere. The extra stuff apart from error handling isn't required if you use a more generic type like `map[string]interface{}`.