code: func createSerializers(config ContentConfig) (*Serializers, error) {
  	mediaTypes := config.NegotiatedSerializer.SupportedMediaTypes()
  	contentType := config.ContentType
  	mediaType, _, err := mime.ParseMediaType(contentType)
  	if err != nil {
  		return nil, fmt.Errorf("the content type specified in the client configuration is not recognized: %v", err)
  	}
  	info, ok := runtime.SerializerInfoForMediaType(mediaTypes, mediaType)
  	if !ok {
  		if len(contentType) != 0 || len(mediaTypes) == 0 {
  			return nil, fmt.Errorf("no serializers registered for %s", contentType)
  		}
  		info = mediaTypes[0]
  	}
  
  	internalGV := schema.GroupVersions{
  		{
  			Group:   config.GroupVersion.Group,
  			Version: runtime.APIVersionInternal,
  		},
  		// always include the legacy group as a decoding target to handle non-error `Status` return types
  		{
  			Group:   "",
  			Version: runtime.APIVersionInternal,
  		},
  	}
  
  	s := &Serializers{
  		Encoder: config.NegotiatedSerializer.EncoderForVersion(info.Serializer, *config.GroupVersion),
  		Decoder: config.NegotiatedSerializer.DecoderToVersion(info.Serializer, internalGV),
  
  		RenegotiatedDecoder: func(contentType string, params map[string]string) (runtime.Decoder, error) {
  			info, ok := runtime.SerializerInfoForMediaType(mediaTypes, contentType)
  			if !ok {
  				return nil, fmt.Errorf("serializer for %s not registered", contentType)
  			}
  			return config.NegotiatedSerializer.DecoderToVersion(info.Serializer, internalGV), nil
  		},
  	}
  	if info.StreamSerializer != nil {
  		s.StreamingSerializer = info.StreamSerializer.Serializer
  		s.Framer = info.StreamSerializer.Framer
  	}
  
  	return s, nil
  }
docs: // createSerializers creates all necessary serializers for given contentType.
  // TODO: the negotiated serializer passed to this method should probably return
  //   serializers that control decoding and versioning without this package
  //   being aware of the types. Depends on whether RESTClient must deal with
  //   generic infrastructure.