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?

  • 11
    You make it sound like Microsoft has bags of money to throw around. While they're quite rich, their resources aren't unlimited, which makes their calculus the same as yours: "why should I spend time and money to write something for which a perfectly good open-source alternative already exists?" – Robert Harvey Jan 26 '17 at 15:57
  • Microsoft started becoming more open-source friendly years ago; they bundled jQuery into ASP.NET MVC early on. Going open-source with .NET is part of that shift. – Robert Harvey Jan 26 '17 at 16:01
  • 3
    You can find out a bit more about the history of JSON.NET here: newtonsoft.com/json/help/html/Introduction.htm – Robert Harvey Jan 26 '17 at 16:07
  • Why not? It's a world class JSON serialising library, I'm guessing MS wisely decided to focus their energies on other problems and not reinvent the wheel. – Fergal Moran Feb 27 '17 at 19:17
  • 2
    Interestingly, James Newton-King announced in March 2018 that he would be joining Microsoft. – Jeroen Apr 5 at 14:27
up vote 16 down vote accepted

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.

  • All fair, and certainly we don't want to go back to "NIH". Even so, I wish this library would still be included in MS's stack. The reason being, there's a huge pressure for any external libraries to not have any external, non-core framework dependencies. This is the only library one frequently encounters where that is a hard thing to do, and no wonder, this is such bread-and-butter functionality, it's like thinking of .NET without native XML tooling (XElement etc). No wonder this is the #1 library in all of nuget (!). My 2 cents. – Nicholas Petersen Aug 20 at 16:23
  • 1
    @NicholasPetersen You can read here about a proposal to include it in .NET Standard. Last I checked the discussion, the majority were against it, but maybe for including a subset, a lighter JSON parser in the standard libraries. – Avner Shahar-Kashtan Aug 20 at 16:25
  • They make good points, even though I wasn't thinking it should be added as part of .NET Standard, as some mentioned, as it seems way too heavy to cement into netstandard for all time. My thought was including it as part of netcore (I suppose in corefx), but I admit, I could be naive in what I'm requesting here. Some people there suggested it be part of NET Foundation, sounds good, but I don't know if that would alleviate the real-world problem of allowing other libraries to not have to reference a library external to the framework. – Nicholas Petersen Aug 20 at 16:50

protected by gnat Jan 9 at 22:53

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.