gpt4 book ai didi

.net - .NET 4 是否有内置的 JSON 序列化器/反序列化器?

转载 作者:IT老高 更新时间:2023-10-28 12:44:22 24 4
gpt4 key购买 nike

.NET 4 是否带有任何对 JSON 数据进行序列化/反序列化的类?

  • 我知道有3rd-party库,比如JSON.NET ,但我正在寻找 .NET 中内置的东西。

  • 我找到了Data Contracts在 MSDN 上,但它适用于 WCF,而不适用于 Winforms 或 WPF。

最佳答案

您可以使用 DataContractJsonSerializer任何你想要的类,它只是一个 .net 类,不限于 WCF。有关如何使用它的更多信息herehere .

关于.net - .NET 4 是否有内置的 JSON 序列化器/反序列化器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3275863/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com