diff --git a/unmarshal.go b/unmarshal.go index 3694ce7..96c4c7a 100644 --- a/unmarshal.go +++ b/unmarshal.go @@ -83,9 +83,6 @@ func jsonUnmarshal(reader io.Reader, obj interface{}, opts ...JSONOpt) error { // optionally performing the unmarshalling strictly func unmarshal(yamlBytes []byte, obj interface{}, unmarshalFn func([]byte, interface{}) error, opts ...JSONOpt) error { jsonTarget := reflect.ValueOf(obj) - if jsonTarget.Kind() != reflect.Ptr || jsonTarget.IsNil() { - return fmt.Errorf("provided object is not a valid pointer") - } jsonBytes, err := yamlToJSONTarget(yamlBytes, &jsonTarget, unmarshalFn) if err != nil {