anchor.diff:      override x.WriteJson(writer: JsonWriter, objValue: obj, serializer: JsonSerializer) =
           // If the value is not an FsDoc use the Fable.JsonConverter to serialize it.
           if objValue.GetType() <> typeof<FsDoc<'doctype>>
  -        then x.CustomConverter.WriteJson(writer, objValue, serializer)
  +        then
  +            // Since this method will only be called if the type is FsDoc<'doctype> or a type that can be converted by the
  +            // CustomConverter, we can safely use that converter here to write the value.
  +            x.CustomConverter.WriteJson(writer, objValue, serializer)
           else
   
           writer.WriteStartObject()
  
positive.code:     inherit Davenport.Entities.CouchDoc()
      member val Data: 'doctype option = None with get,set
  
  type FsConverter<'doctype>(idField: string, revField: string, customConverter: JsonConverter option) =
      inherit JsonConverter()
  
      member __.CustomConverter = Option.defaultWith (fun _ -> Fable.JsonConverter() :> JsonConverter) customConverter
  
      override x.CanConvert objectType =
          // This converter will convert anything that is an FsDoc or anything that can be handled by Fable.JsonConverter
          objectType = typeof<FsDoc<'doctype>> || x.CustomConverter.CanConvert objectType
  
      override x.ReadJson(reader: JsonReader, objectType: System.Type, existingValue: obj, serializer: JsonSerializer) =
          if objectType <> typeof<FsDoc<'doctype>>
          then x.CustomConverter.ReadJson(reader, objectType, existingValue, serializer)
          else
  
          let j = JObject.Load reader
  
negative.code:                 j.Add(revField, value)
          )
  
          let data = j.ToObject<'doctype>() // Warning: Adding serializer here causes Fable.JsonConverter to throw an exception when reading F# union types
          let output = FsDoc<'doctype>()
  
          output.Id <-
  