I think this is too broad a fix. Let's fix the (apparently few) panics
taking strings instead of panicking for everything.
Note that the 'case error' in your switches covers case runtime.Error
too, so this is squelching runtime.Errors that used to be panics.
I only see one panic(" in the tree that isn't unreachable:
scanner.go:610: panic("json: invalid use of scanner")
The test cases in issues 4474 and 4222 are real bugs in the way json
uses reflect: it shouldn't be asking reflect to do those things. We
should fix those calls, not turn reflect's panics into returned errors.
https://codereview.appspot.com/6938045/