anchor.diff:  namespace Giraffe.Serialization
  -
  -open FSharp.Control.Tasks.V2
   
   // ---------------------------
   // JSON
  
positive.code:                 JsonConvert.DeserializeObject<'T>(json, settings)
  
              member __.DeserializeAsync<'T> (stream : Stream) = task {
                  let memoryStream = new MemoryStream()
                  do! stream.CopyToAsync(memoryStream)
                  memoryStream.Seek(0L, SeekOrigin.Begin) |> ignore
                  let streamReader = new StreamReader(memoryStream)
                  let jsonTextReader = new JsonTextReader(streamReader)
                  return serializer.Deserialize<'T>(jsonTextReader)
              }
  // ---------------------------
  
negative.code:                 JsonConvert.SerializeObject(x, settings)
                  |> Encoding.UTF8.GetBytes
  
              member __.SerializeToStreamAsync (x : 'T) (stream : Stream) = 
                  task {
                      use memoryStream = new MemoryStream()
                      use streamWriter = new StreamWriter(memoryStream, Utf8EncodingWithoutBom)
                      use jsonTextWriter = new JsonTextWriter(streamWriter)
                      serializer.Serialize(jsonTextWriter, x)
                      do! memoryStream.CopyToAsync(stream) 
                  } :> Task
  
              member __.Deserialize<'T> (json : string) =
                  JsonConvert.DeserializeObject<'T>(json, settings)
  