20

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?

5
  • 15
    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?" Jan 26, 2017 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. Jan 26, 2017 at 16:01
  • 4
    You can find out a bit more about the history of JSON.NET here: newtonsoft.com/json/help/html/Introduction.htm Jan 26, 2017 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. Feb 27, 2017 at 19:17
  • 7
    Interestingly, James Newton-King announced in March 2018 that he would be joining Microsoft.
    – Jeroen
    Apr 5, 2018 at 14:27

1 Answer 1

21

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.

3
  • 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. Aug 20, 2018 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. Aug 20, 2018 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. Aug 20, 2018 at 16:50

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