Sunday, January 29, 2017

.NET JsonContent for HttpClient

.NET already comes with a nice collection of HttpContent serializers, but it lacks a JsonContent type. A common solution is to just serialize their payload to a JSON string and that insert that into an instance of StringContent. However, this means that you need to remember to set your headers, and it is a little bit inefficient because of how it creates multiple strings and buffers for each payload.

I have create a simple implementation of JsonContent that uses Json.NET and pooled memory streams. The result is between 2% and 10% faster, and causes ~50% fewer garbage collections.

Check out the implementation in Tact.NET:



  1. Thank you so much for providing good quality information. 먹튀검증업체 I think it would not have been easy to collect this information and organize it in an easy to understand way. I'll add it to my bookmarks so I can visit it often! And I will share it with my acquaintances. And there is a lot of useful information on our website too, so please take a look and take a look. Then have a good day. 안전토토사이트

  2. 우리카지노사이트 더킹카지노 샌즈카지노 퍼스트카지노 예스카지노 슈퍼카지노 개츠비카지노 33카지노 월드카지노 메리트카지노

  3. When I read your article on this topic, the first thought seems profound and difficult. There is also a bulletin board for discussion of articles and photos similar to this topic on my site, but I would like to visit once when I have time to discuss this topic. 메이저사이트

  4. Wow! This blog looks exactly like my old one! It’s on a totally different subject but it has pretty much the same layout and design. Superb choice of colors!


  5. Sonic Mania is a throwback to the original quadrilogy of Sonic games on the Sega Genesis, but it far outperforms them in terms of quality and fun. The game feels like it picks up where Sonic and Knuckles left off in terms of gameplay quality.
    sonic mania pc crack

  6. I am really happy with your blog because your article is very unique and powerful for new. . I want share about Aaraa couture

  7. Amazing blog! I really like the way you explained such information about this post to us. And a blog is really helpful for us this website.
    LastPass Password Generator Crack
    UltraMixer Crack
    Luminar Crack
    Tenorshare 4uKey Crack
    UltraISO Crack
    Camtasia Studio Crack
    NTLite Crack
    iMazing Crack

  8. Thank you so much for your excellent blog! I really enjoy to visit your very interesting post, Well done!
    Family Lawyer Cost
    Female Family Lawyer Near Me

  9. Nice piece of information. Kindly check out my new blog Monosnap Serial Key 2023


Real Time Web Analytics