当涉及到.NET中的JSON编码和解码时,哪个更好呢?我都试过了,到目前为止,JsonConvert似乎做得很好.我过go 成功地使用过JavaScriptSerializer,但最近遇到了一些问题.使用JSON.NET比使用.NET类更好吗?

What are the preferred functions for encoding/decoding json using the appropriate library? I use SerializeObject/DeSerializeObject from JSON.NET and Serialize/DeSerialize from .NET.

谢谢

推荐答案

I think this is exactly the kind of comparison you are looking for.

It basically says that JSON.Net is better because it among other things...

  • faster
  • Has LINQ to JSON support
  • 你能从XMLconvert

在我看来,对于内置的序列化程序,我能看到的唯一好处(这是一个小小的好处)是没有额外的外部依赖需要管理.

Edit: Codeplex is shutting down one day so you can find the comparison here as well, just search for "Feature comparison" on the page.

Json相关问答推荐

try 将文本标记放置在条形图上的同一高度

如何获取brew list作为JSON输出

合并二维数组的Jolt表达式

NIFI-我需要数组的信息,但只需要第一个信息

使用json_query更新事实

如何在Android中解析带有动态键和可变对象名称的改装JSON响应?

使用 JOLT 将日期格式转换为 JSON

从 Inno Setup 中的 JSON 文件的每个对象中读取特定字符串

VBA-JSON 嵌套集合解析为 Excel

父键中的 Perl JSON 数组

将 json 文件转换为 json 对象会打乱对象的顺序

使用 System.Text.Json 序列化记录成员

如何使用 jq 返回此 JSON 文件的文本字段?

如何使用 Kotlin + Jackson 将 JSON 反序列化为 List

如何使用 json.net 将数据表转换为 json 字符串?

什么是类型和类型令牌?

JSON对象中的JavaScript递归搜索

将文件发送到 Rails JSON API

关于使用 $ref 的 JSON 模式

JSON 和 BSON 哪个更轻量级?