Fixed parsing of JSON strings when providing an object instance rather
than a type.