# ![Logo](https://raw.githubusercontent.com/JamesNK/Newtonsoft.Json/master/Doc/icons/logo.jpg) Json.NET
[![NuGet version (Newtonsoft.Json)](https://img.shields.io/nuget/v/Newtonsoft.Json.svg?style=flat-square)](https://www.nuget.org/packages/Newtonsoft.Json/)
[![Build status](https://dev.azure.com/jamesnk/Public/_apis/build/status/JamesNK.Newtonsoft.Json?branchName=master)](https://dev.azure.com/jamesnk/Public/_build/latest?definitionId=8)
Json.NET is a popular high-performance JSON framework for .NET
## Serialize JSON
```csharp
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
```csharp
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
```csharp
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
- [Homepage](https://www.newtonsoft.com/json)
- [Documentation](https://www.newtonsoft.com/json/help)
- [NuGet Package](https://www.nuget.org/packages/Newtonsoft.Json)
- [Release Notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
- [Contributing Guidelines](https://github.com/JamesNK/Newtonsoft.Json/blob/master/CONTRIBUTING.md)
- [License](https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md)
- [Stack Overflow](https://stackoverflow.com/questions/tagged/json.net)
没有合适的资源?快使用搜索试试~ 我知道了~
C#解析JSON实例.rar
共58个文件
xml:9个
dll:9个
cs:9个
需积分: 5 2 下载量 95 浏览量
2023-06-03
10:23:21
上传
评论
收藏 4.66MB RAR 举报
温馨提示
C#编写的解析及生成JSON实例
资源推荐
资源详情
资源评论
收起资源包目录
C#解析JSON实例.rar (58个子文件)
C#解析JSON实例
jsondemo
.vs
jsondemo
v15
.suo 51KB
Server
sqlite3
storage.ide-shm 32KB
storage.ide 604KB
storage.ide-wal 3.94MB
db.lock 0B
jsondemo
Form1.Designer.cs 4KB
packages.config 144B
App.config 189B
Form1.cs 2KB
obj
Debug
jsondemo.csproj.CoreCompileInputs.cache 42B
TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs 0B
TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs 0B
jsondemo.csproj.FileListAbsolute.txt 1KB
jsondemo.pdb 28KB
DesignTimeResolveAssemblyReferencesInput.cache 7KB
TempPE
jsondemo.exe 10KB
jsondemo.csprojAssemblyReference.cache 11KB
jsondemo.Properties.Resources.resources 180B
TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs 0B
jsondemo.Form1.resources 180B
jsondemo.csproj.CopyComplete 0B
jsondemo.csproj.GenerateResource.cache 1012B
DesignTimeResolveAssemblyReferences.cache 1KB
bin
Debug
jsondemo.exe.config 189B
jsondemo.pdb 28KB
Newtonsoft.Json.xml 697KB
jsondemo.exe 10KB
Newtonsoft.Json.dll 695KB
Properties
Resources.Designer.cs 3KB
Settings.Designer.cs 1KB
Settings.settings 249B
AssemblyInfo.cs 1KB
Resources.resx 5KB
Program.cs 520B
jsondemo.csproj 4KB
Form1.resx 6KB
jsondemo.sln 1KB
packages
Newtonsoft.Json.13.0.3
lib
net45
Newtonsoft.Json.xml 697KB
Newtonsoft.Json.dll 695KB
netstandard1.0
Newtonsoft.Json.xml 676KB
Newtonsoft.Json.dll 665KB
net40
Newtonsoft.Json.xml 554KB
Newtonsoft.Json.dll 571KB
netstandard1.3
Newtonsoft.Json.xml 684KB
Newtonsoft.Json.dll 683KB
net35
Newtonsoft.Json.xml 542KB
Newtonsoft.Json.dll 504KB
netstandard2.0
Newtonsoft.Json.xml 696KB
Newtonsoft.Json.dll 689KB
net20
Newtonsoft.Json.xml 596KB
Newtonsoft.Json.dll 567KB
net6.0
Newtonsoft.Json.xml 694KB
Newtonsoft.Json.dll 696KB
LICENSE.md 1KB
Newtonsoft.Json.13.0.3.nupkg 2.33MB
packageIcon.png 9KB
README.md 2KB
.signature.p7s 24KB
共 58 条
- 1
资源评论
未来无限
- 粉丝: 2374
- 资源: 49
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功