This line assumes that v will always contain a pointer to a struct (see http://play.golang.org/p/LJdfXmmVi1 & http://play.golang.org/p/9N0HzRDWX8), when the PrimitiveDecode API makes no such assumption. I think we'll want an IsPtr check around this.