code: func Object(encoder runtime.Encoder, event *watch.Event) (interface{}, error) {
  	obj, ok := event.Object.(runtime.Object)
  	if !ok {
  		return nil, fmt.Errorf("the event object cannot be safely converted to JSON: %v", reflect.TypeOf(event.Object).Name())
  	}
  	data, err := runtime.Encode(encoder, obj)
  	if err != nil {
  		return nil, err
  	}
  	return &WatchEvent{event.Type, runtime.RawExtension{RawJSON: json.RawMessage(data)}}, nil
  }
docs: // Object converts a watch.Event into an appropriately serializable JSON object