Why Microsoft’s Libraries Depend on Newtonsoft.Json

asp.netjsonnetweb-api

This had probably started way back when Microsoft created ASP.NET Web API library, at least that's when I remember it if I am not mistaken. Anyway, since then, its HTTP packages started depending on Newtonsoft.Json library for data (de)serialization to and from JSON.

Why would a company as large as Microsoft would add a dependency on an open source library? I find it strange even if they were going to go fully open source with .NET back then because it has been the only non-Microsoft library used as a dependency, as far as I know.

As a bonus question, does James Newton-King get any financial support from Microsoft?

Best Answer

The most direct quote I've found is part of Scott Guthrie's announcement of the MVC 4 roadmap, back in 2012, (apparently offline but available via the Wayback Machine) which contains the following quote:

Json.NET: We plan to use the community developed Json.NET serialization stack in our default JSON formatter in ASP.NET Web API. Json.NET provides the flexibility and performance required for a modern web framework.

So the simple reason is it's the best available JSON library, while MVC was one of Microsoft's first large projects to ditch the entrenched NIH attitude that characterized MS as well as other software giants, and reach out to best-of-breed open-source projects as foundations for its own offerings.

Related Topic