Open
Description
When using the JSON package, if I encode a struct like
type Data struct {
Count int
Names []string
}
and then decode it into
type SmallData struct {
Count int
}
it will still allocate memory for the list of names, even though it just gets thrown away. This becomes an annoyance when I have several multigigabyte JSON files like this. It would be neat if the JSON parser could identify what fields it cares about, or somehow be told what fields to ignore, and chuck them.