Newtonsoft.Json
13.0.2
Requires NuGet 2.12 or higher.
dotnet add package Newtonsoft.Json --version 13.0.2
NuGet\Install-Package Newtonsoft.Json -Version 13.0.2
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
paket add Newtonsoft.Json --version 13.0.2
#r "nuget: Newtonsoft.Json, 13.0.2"
// 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
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 (38.7K)
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/7c810658463f35c39c54d5fb8a8dbbfd463bf747 |
|
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.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
|
|
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.
|
Version | Downloads | Last updated | |
---|---|---|---|
13.0.2 | 7,601,650 | 11/24/2022 | |
13.0.1 | 264,566,980 | 3/22/2021 | |
12.0.3 | 363,823,925 | 11/9/2019 | |
12.0.2 | 261,490,746 | 4/22/2019 | |
12.0.1 | 128,697,423 | 11/27/2018 | |
11.0.2 | 326,285,859 | 3/24/2018 | |
11.0.1 | 107,966,598 | 2/17/2018 | |
10.0.3 | 279,669,118 | 6/18/2017 | |
10.0.2 | 164,131,531 | 4/2/2017 | |
10.0.1 | 262,856,412 | 3/20/2017 | |
9.0.1 | 417,319,425 | 6/22/2016 | |
8.0.3 | 16,551,552 | 3/14/2016 | |
8.0.2 | 6,983,532 | 1/9/2016 | |
8.0.1 | 2,168,804 | 12/29/2015 | |
7.0.1 | 25,658,312 | 6/22/2015 | |
6.0.8 | 29,383,782 | 1/11/2015 | |
6.0.7 | 1,289,309 | 12/23/2014 | |
6.0.6 | 5,985,269 | 10/24/2014 | |
6.0.5 | 4,935,120 | 9/6/2014 | |
6.0.4 | 40,901,247 | 8/3/2014 | |
6.0.3 | 3,694,096 | 4/27/2014 | |
6.0.2 | 1,276,436 | 3/30/2014 | |
6.0.1 | 6,699,223 | 2/1/2014 | |
5.0.8 | 5,161,227 | 10/17/2013 | |
5.0.7 | 537,088 | 10/14/2013 | |
5.0.6 | 4,272,716 | 6/6/2013 | |
5.0.5 | 1,026,600 | 5/8/2013 | |
5.0.4 | 4,535,782 | 4/25/2013 | |
5.0.3 | 419,263 | 4/14/2013 | |
5.0.2 | 354,008 | 4/8/2013 | |
5.0.1 | 4,542,253 | 4/7/2013 | |
4.5.11 | 11,106,035 | 11/20/2012 | |
4.5.10 | 510,618 | 10/7/2012 | |
4.5.9 | 407,244 | 9/8/2012 | |
4.5.8 | 374,510 | 8/4/2012 | |
4.5.7 | 437,750 | 6/9/2012 | |
4.5.6 | 4,238,410 | 5/30/2012 | |
4.5.5 | 149,731 | 5/8/2012 | |
4.5.4 | 162,048 | 4/24/2012 | |
4.5.3 | 98,885 | 4/13/2012 | |
4.5.2 | 70,455 | 4/11/2012 | |
4.5.1 | 1,050,818 | 3/20/2012 | |
4.0.8 | 517,245 | 2/12/2012 | |
4.0.7 | 325,756 | 1/24/2012 | |
4.0.6 | 84,771 | 1/23/2012 | |
4.0.5 | 473,781 | 12/10/2011 | |
4.0.4 | 90,205 | 11/19/2011 | |
4.0.3 | 167,320 | 10/2/2011 | |
4.0.2 | 271,062 | 4/23/2011 | |
4.0.1 | 309,401 | 4/22/2011 | |
3.5.8 | 2,090,372 | 1/8/2011 |