Newtonsoft.Json 13.0.2

.NET 6.0 .NET Standard 1.0 .NET Framework 2.0

Requires NuGet 2.12 or higher.

dotnet add package Newtonsoft.Json --version 13.0.2
NuGet\Install-Package Newtonsoft.Json -Version 13.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Newtonsoft.Json --version 13.0.2
#r "nuget: Newtonsoft.Json, 13.0.2"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Newtonsoft.Json as a Cake Addin
#addin nuget:?package=Newtonsoft.Json&version=13.0.2

// Install Newtonsoft.Json as a Cake Tool
#tool nuget:?package=Newtonsoft.Json&version=13.0.2

Logo Json.NET

NuGet version (Newtonsoft.Json) Build status

Json.NET is a popular high-performance JSON framework for .NET

Serialize JSON

Product product = new Product();
product.Name = "Apple";
product.Expiry = new DateTime(2008, 12, 28);
product.Sizes = new string[] { "Small" };

string json = JsonConvert.SerializeObject(product);
// {
//   "Name": "Apple",
//   "Expiry": "2008-12-28T00:00:00",
//   "Sizes": [
//     "Small"
//   ]
// }

Deserialize JSON

string json = @"{
  'Name': 'Bad Boys',
  'ReleaseDate': '1995-4-7T00:00:00',
  'Genres': [
    'Action',
    'Comedy'
  ]
}";

Movie m = JsonConvert.DeserializeObject<Movie>(json);

string name = m.Name;
// Bad Boys

LINQ to JSON

JArray array = new JArray();
array.Add("Manual text");
array.Add(new DateTime(2000, 5, 23));

JObject o = new JObject();
o["MyArray"] = array;

string json = o.ToString();
// {
//   "MyArray": [
//     "Manual text",
//     "2000-05-23T00:00:00"
//   ]
// }
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp1.0 netcoreapp1.1 netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard1.0 netstandard1.1 netstandard1.2 netstandard1.3 netstandard1.4 netstandard1.5 netstandard1.6 netstandard2.0 netstandard2.1
.NET Framework net20 net35 net40 net403 net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen30 tizen40 tizen60
Universal Windows Platform uap uap10.0
Windows Phone wp8 wp81 wpa81
Windows Store netcore netcore45 netcore451
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (38.0K)

Showing the top 5 NuGet packages that depend on Newtonsoft.Json:

Package Downloads
Microsoft.AspNetCore.JsonPatch The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

ASP.NET Core support for JSON PATCH. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/bb01bbf4433e27289b99001b7de6a582879d1835

Microsoft.TestPlatform.TestHost The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Testplatform host executes the test using specified adapter.

Newtonsoft.Json.Bson The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Json.NET BSON adds support for reading and writing BSON

Microsoft.AspNet.WebApi.Client The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

This package adds support for formatting and content negotiation to System.Net.Http. It includes support for JSON, XML, and form URL encoded data.

Microsoft.Rest.ClientRuntime The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Infrastructure for error handling, tracing, and HttpClient pipeline configuration. Required by client libraries generated using AutoRest.

GitHub repositories (2.8K)

Showing the top 5 popular GitHub repositories that depend on Newtonsoft.Json:

Repository Stars
microsoft/PowerToys
Windows system utilities to maximize productivity
PowerShell/PowerShell
PowerShell for every system!
2dust/v2rayN
A V2Ray client for Windows, support Xray core and v2fly core
CodeHubApp/CodeHub
CodeHub is an iOS application written using Xamarin
Wox-launcher/Wox
Launcher for Windows, an alternative to Alfred and Launchy.
Version Downloads Last updated
13.0.2 67,411 11/24/2022
13.0.2-beta3 11,933 11/14/2022
13.0.2-beta2 142,464 8/30/2022
13.0.2-beta1 331,921 5/16/2022
13.0.1 211,470,840 3/22/2021
12.0.3 336,930,070 11/9/2019
12.0.2 246,806,600 4/22/2019
12.0.1 122,059,147 11/27/2018
11.0.2 300,682,870 3/24/2018
11.0.1 98,739,074 2/17/2018
10.0.3 262,666,446 6/18/2017
10.0.2 153,916,460 4/2/2017
10.0.1 242,646,880 3/20/2017
9.0.1 380,719,460 6/22/2016
8.0.3 16,131,685 3/14/2016
8.0.2 6,820,270 1/9/2016
8.0.1 2,125,016 12/29/2015
7.0.1 24,899,777 6/22/2015
6.0.8 28,611,979 1/11/2015
6.0.7 1,273,443 12/23/2014
6.0.6 5,912,735 10/24/2014
6.0.5 4,825,095 9/6/2014
6.0.4 39,437,989 8/3/2014
6.0.3 3,590,156 4/27/2014
6.0.2 1,245,972 3/30/2014
6.0.1 6,438,248 2/1/2014
5.0.8 5,018,072 10/17/2013
5.0.7 531,426 10/14/2013
5.0.6 4,181,019 6/6/2013
5.0.5 989,935 5/8/2013
5.0.4 4,340,037 4/25/2013
5.0.3 411,765 4/14/2013
5.0.2 346,359 4/8/2013
5.0.1 4,301,717 4/7/2013
4.5.11 10,857,392 11/20/2012
4.5.10 500,080 10/7/2012
4.5.9 395,853 9/8/2012
4.5.8 365,075 8/4/2012
4.5.7 427,145 6/9/2012
4.5.6 4,060,373 5/30/2012
4.5.5 143,390 5/8/2012
4.5.4 155,782 4/24/2012
4.5.3 92,952 4/13/2012
4.5.2 66,154 4/11/2012
4.5.1 994,306 3/20/2012
4.0.8 499,295 2/12/2012
4.0.7 321,004 1/24/2012
4.0.6 78,975 1/23/2012
4.0.5 443,352 12/10/2011
4.0.4 85,510 11/19/2011
4.0.3 158,855 10/2/2011
4.0.2 255,478 4/23/2011
4.0.1 294,453 4/22/2011
3.5.8 1,916,415 1/8/2011