Newtonsoft.Json 13.0.2-beta2

.NET 6.0 .NET Standard 1.0 .NET Framework 2.0
This is a prerelease version of Newtonsoft.Json.

Requires NuGet 2.12 or higher.

NuGet\Install-Package Newtonsoft.Json -Version 13.0.2-beta2
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.
dotnet add package Newtonsoft.Json --version 13.0.2-beta2
<PackageReference Include="Newtonsoft.Json" Version="13.0.2-beta2" />
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-beta2
#r "nuget: Newtonsoft.Json, 13.0.2-beta2"
#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-beta2&prerelease

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

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 (37.4K)

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/cb14812a5c6098bd1091f5b7fd471ce2be45e8dd

Microsoft.NET.Test.Sdk The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

The MSbuild targets and properties for building .NET test projects.

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.

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.

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

GitHub repositories (2.7K)

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
files-community/Files
Building the best File Manager for Windows
CodeHubApp/CodeHub
CodeHub is an iOS application written using Xamarin
Version Downloads Last updated
13.0.2-beta2 32,837 8/30/2022
13.0.2-beta1 220,696 5/16/2022
13.0.1 155,152,845 3/22/2021
12.0.3 303,064,142 11/9/2019
12.0.2 229,504,077 4/22/2019
12.0.1 113,353,534 11/27/2018
11.0.2 270,823,881 3/24/2018
11.0.1 86,684,247 2/17/2018
10.0.3 242,633,071 6/18/2017
10.0.2 142,329,431 4/2/2017
10.0.1 219,644,797 3/20/2017
9.0.1 337,945,868 6/22/2016
8.0.3 15,312,257 3/14/2016
8.0.2 6,454,868 1/9/2016
8.0.1 2,054,743 12/29/2015
7.0.1 23,573,472 6/22/2015
6.0.8 27,388,098 1/11/2015
6.0.7 1,248,731 12/23/2014
6.0.6 5,784,685 10/24/2014
6.0.5 4,589,368 9/6/2014
6.0.4 37,725,034 8/3/2014
6.0.3 3,363,438 4/27/2014
6.0.2 1,186,827 3/30/2014
6.0.1 6,044,678 2/1/2014
5.0.8 4,744,862 10/17/2013
5.0.7 523,858 10/14/2013
5.0.6 4,044,932 6/6/2013
5.0.5 913,410 5/8/2013
5.0.4 4,075,704 4/25/2013
5.0.3 399,730 4/14/2013
5.0.2 333,109 4/8/2013
5.0.1 4,034,883 4/7/2013
4.5.11 10,470,518 11/20/2012
4.5.10 480,074 10/7/2012
4.5.9 371,640 9/8/2012
4.5.8 347,305 8/4/2012
4.5.7 407,267 6/9/2012
4.5.6 3,810,412 5/30/2012
4.5.5 132,157 5/8/2012
4.5.4 145,324 4/24/2012
4.5.3 83,883 4/13/2012
4.5.2 61,849 4/11/2012
4.5.1 877,401 3/20/2012
4.0.8 458,946 2/12/2012
4.0.7 316,052 1/24/2012
4.0.6 69,954 1/23/2012
4.0.5 400,209 12/10/2011
4.0.4 79,370 11/19/2011
4.0.3 142,956 10/2/2011
4.0.2 218,314 4/23/2011
4.0.1 265,103 4/22/2011
3.5.8 1,613,459 1/8/2011