Newtonsoft.Json
13.0.3
Requires NuGet 2.12 or higher.
dotnet add package Newtonsoft.Json --version 13.0.3
NuGet\Install-Package Newtonsoft.Json -Version 13.0.3
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
paket add Newtonsoft.Json --version 13.0.3
#r "nuget: Newtonsoft.Json, 13.0.3"
// Install Newtonsoft.Json as a Cake Addin
#addin nuget:?package=Newtonsoft.Json&version=13.0.3
// Install Newtonsoft.Json as a Cake Tool
#tool nuget:?package=Newtonsoft.Json&version=13.0.3
Json.NET
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"
// ]
// }
Links
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 net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.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 net481 |
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 |
-
.NETFramework 2.0
- No dependencies.
-
.NETFramework 3.5
- No dependencies.
-
.NETFramework 4.0
- No dependencies.
-
.NETFramework 4.5
- No dependencies.
-
.NETStandard 1.0
- Microsoft.CSharp (>= 4.3.0)
- NETStandard.Library (>= 1.6.1)
- System.ComponentModel.TypeConverter (>= 4.3.0)
- System.Runtime.Serialization.Primitives (>= 4.3.0)
-
.NETStandard 1.3
- Microsoft.CSharp (>= 4.3.0)
- NETStandard.Library (>= 1.6.1)
- System.ComponentModel.TypeConverter (>= 4.3.0)
- System.Runtime.Serialization.Formatters (>= 4.3.0)
- System.Runtime.Serialization.Primitives (>= 4.3.0)
- System.Xml.XmlDocument (>= 4.3.0)
-
.NETStandard 2.0
- No dependencies.
-
net6.0
- No dependencies.
NuGet packages (39.5K)
Showing the top 5 NuGet packages that depend on Newtonsoft.Json:
Package | Downloads |
---|---|
Microsoft.AspNetCore.JsonPatch
ASP.NET Core support for JSON PATCH. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/5ae8106f83d4d23cd0a2d2474c1b15e4d5dfc9eb |
|
Microsoft.TestPlatform.TestHost
Testplatform host executes the test using specified adapter. |
|
Newtonsoft.Json.Bson
Json.NET BSON adds support for reading and writing BSON |
|
Microsoft.AspNet.WebApi.Client
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
Infrastructure for error handling, tracing, and HttpClient pipeline configuration. Required by client libraries generated using AutoRest. |
GitHub repositories (2.9K)
Showing the top 5 popular GitHub repositories that depend on Newtonsoft.Json:
Repository | Stars |
---|---|
microsoft/PowerToys
Windows system utilities to maximize productivity
|
|
2dust/v2rayN
A V2Ray client for Windows, support Xray core and v2fly core
|
|
PowerShell/PowerShell
PowerShell for every system!
|
|
ShareX/ShareX
ShareX is a free and open source program that lets you capture or record any area of your screen and share it with a single press of a key. It also allows uploading images, text or other types of files to many supported destinations you can choose from.
|
|
CodeHubApp/CodeHub
CodeHub is an iOS application written using Xamarin
|
Version | Downloads | Last updated | |
---|---|---|---|
13.0.3 | 1,085,317 | 3/8/2023 | |
13.0.3-beta1 | 111,958 | 2/6/2023 | |
13.0.2 | 21,036,981 | 11/24/2022 | |
13.0.1 | 310,618,263 | 3/22/2021 | |
12.0.3 | 383,756,820 | 11/9/2019 | |
12.0.2 | 272,400,050 | 4/22/2019 | |
12.0.1 | 133,747,859 | 11/27/2018 | |
11.0.2 | 346,606,635 | 3/24/2018 | |
11.0.1 | 115,016,368 | 2/17/2018 | |
10.0.3 | 294,107,928 | 6/18/2017 | |
10.0.2 | 172,958,300 | 4/2/2017 | |
10.0.1 | 279,510,213 | 3/20/2017 | |
9.0.1 | 447,558,542 | 6/22/2016 | |
8.0.3 | 16,755,926 | 3/14/2016 | |
8.0.2 | 7,049,562 | 1/9/2016 | |
8.0.1 | 2,201,673 | 12/29/2015 | |
7.0.1 | 26,156,089 | 6/22/2015 | |
6.0.8 | 29,927,983 | 1/11/2015 | |
6.0.7 | 1,299,006 | 12/23/2014 | |
6.0.6 | 6,028,732 | 10/24/2014 | |
6.0.5 | 4,986,718 | 9/6/2014 | |
6.0.4 | 42,300,043 | 8/3/2014 | |
6.0.3 | 3,740,201 | 4/27/2014 | |
6.0.2 | 1,290,050 | 3/30/2014 | |
6.0.1 | 6,880,852 | 2/1/2014 | |
5.0.8 | 5,243,827 | 10/17/2013 | |
5.0.7 | 540,576 | 10/14/2013 | |
5.0.6 | 4,342,139 | 6/6/2013 | |
5.0.5 | 1,033,860 | 5/8/2013 | |
5.0.4 | 4,699,241 | 4/25/2013 | |
5.0.3 | 424,423 | 4/14/2013 | |
5.0.2 | 356,981 | 4/8/2013 | |
5.0.1 | 4,767,976 | 4/7/2013 | |
4.5.11 | 11,266,538 | 11/20/2012 | |
4.5.10 | 515,913 | 10/7/2012 | |
4.5.9 | 412,785 | 9/8/2012 | |
4.5.8 | 379,638 | 8/4/2012 | |
4.5.7 | 443,023 | 6/9/2012 | |
4.5.6 | 4,372,965 | 5/30/2012 | |
4.5.5 | 152,531 | 5/8/2012 | |
4.5.4 | 164,927 | 4/24/2012 | |
4.5.3 | 101,780 | 4/13/2012 | |
4.5.2 | 73,504 | 4/11/2012 | |
4.5.1 | 1,069,218 | 3/20/2012 | |
4.0.8 | 522,899 | 2/12/2012 | |
4.0.7 | 329,005 | 1/24/2012 | |
4.0.6 | 87,453 | 1/23/2012 | |
4.0.5 | 499,875 | 12/10/2011 | |
4.0.4 | 92,930 | 11/19/2011 | |
4.0.3 | 171,374 | 10/2/2011 | |
4.0.2 | 276,273 | 4/23/2011 | |
4.0.1 | 316,171 | 4/22/2011 | |
3.5.8 | 2,186,440 | 1/8/2011 |