在 Windows Mobile 上是否有一个库可以在 C# 中读取 JSON?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/183473/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-03 16:57:44  来源:igfitidea点击:

Is there a library to read JSON in C# on Windows Mobile?

c#jsoncompact-frameworkjson.net

提问by Thomas L?tzer

I am trying to find a library to parse JSON on C# on Windows Mobile (working with Visual Studio 2005). The libraries that I have found that allow me to parse JSON in C# (litjson and Jayrock) don't work on Windows Mobile, they require classes that are not present in the .NET compact framework. Is there any library that I have overlooked? Or is there another easy way to parse JSON given these circumstances?

我正在尝试找到一个库来解析 Windows Mobile 上 C# 上的 JSON(使用 Visual Studio 2005)。我发现的允许我在 C# 中解析 JSON 的库(litjson 和 Jayrock)在 Windows Mobile 上不起作用,它们需要 .NET 紧凑框架中不存在的类。有没有我忽略的图书馆?或者在这些情况下是否有另一种简单的方法来解析 JSON?

回答by Jon Skeet

Have you looked at what the "missing" classes actually have to do for the existing libraries? If they're reasonably simple to implement yourself, that would be my first suggestion - then contribute the results back to those projects.

您是否查看过“缺失”的类实际上对现有库有什么作用?如果他们自己实施起来相当简单,那将是我的第一个建议 - 然后将结果贡献给这些项目。

回答by Amir Arad

look here- several C# json libraries to pick from. also, "manually" parsing JSON from string is not all that difficult.

这里- 几个 C# json 库可供选择。此外,从字符串“手动”解析 JSON 并不是那么困难。

回答by James Newton-King

Json.NETsupports the .NET 3.5 compact framework.

Json.NET支持 .NET 3.5 紧凑型框架。