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.Json JsonConverter. 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:

https://gist.github.com/aaronhoffman/de40ac508de95101fa41859195728e39


Hope this helps,
Aaron





Comments

Popular posts from this blog

Search iPhone Text Messages with SQLite SQL Query

Configure SonarAnalyzer.CSharp with .editorconfig, no need for SonarCloud or SonarQube

Edit Default Visual Studio 2012 Item and Project Templates