// UnmarshalJSON implements a custom json unmarshal method for a unstructured typed object.
UnmarshalJSON implements a custom json unmarshal method for a unstructured typed object.
// UnmarshalJSON implements a custom json unmarshal method for a unstructured typed object .
func (u *UnstructuredTypedObject) UnmarshalJSON(data []byte) error {
	typedObj := ObjectType{}
	if err := json.Unmarshal(data, &typedObj); err != nil {
		return err
	}
	obj := UnstructuredTypedObject{
		ObjectType: typedObj,
	}
	if err := obj.setRaw(data); err != nil {
		return err
	}
	*u = obj
	return nil
}
func ( u * UnstructuredTypedObject ) UnmarshalJSON ( data [ ] byte ) error { typedObj := ObjectType { } if err := json . Unmarshal ( data , & typedObj ) ; err != nil { return err } obj := UnstructuredTypedObject { ObjectType : typedObj , } if err := obj . setRaw ( data ) ; err != nil { return err } * u = obj return nil }
UnmarshalJSON implements a custom json unmarshal method for a unstructured typed object.
UnmarshalJSON implements a custom json unmarshal method for a unstructured typed object .