Showing posts from September, 2018

Newtonsoft Json BaseJsonConverter

I've recently had a need for a custom JsonConverter to read and write data to CosmosDb in a way that utilizes a CosmosDb document's `id` property. (more on that in a later post)

My first step was to investigate a custom Newtonsoft.JsonJsonConverter. I thought that there might be a BaseJsonConverter implementation somewhere in the docs, but I was wrong.

After digging through many different custom converters, I think I've discovered what the most trivial custom converter might look like.

You can find the example here, and customize it further to fit your needs:

Hope this helps,