machinery for generic FromJSON instances for record types with better errors than the derived instances