简体   繁体   English

如何在c#中将Xml转换为Json,反之亦然

[英]How can I convert Xml to Json and vice versa in c#

I'm supprized that I couldn't find this question here. 我觉得我在这里找不到这个问题。 there seems to be few approches out there but none really seem to work. 似乎很少有approches,但似乎没有一个真正起作用。 I found http://james.newtonking.com/projects/json-net.aspx but it very large. 我找到了http://james.newtonking.com/projects/json-net.aspx,但它非常大。 Is there a simple way to convert Xml to Json and vice versa? 有没有一种简单的方法将Xml转换为Json,反之亦然? Thanks, 谢谢,

我发现http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=Json&ReleaseId=6987这是一个较轻(和较旧)的Json.NET版本,也只需要.Net framework 2.0它只有60K。

超轻解决方案: http//www.phdcc.com/xml2json.htm

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在C#中将位图转换为一维字节数组,反之亦然? - How can I convert a Bitmap to a 1D byte array and vice versa in C#? 如何在事件中调用方法,反之亦然 C# - How can I call method in Event and vice versa C# C#如何将以下表示形式的excel单元格地址转换为“ LetterNumber”到“ Number,Number”,反之亦然? - C# How can I convert an excel cells address in the following notation: “LetterNumber” to “Number, Number” and vice-versa? 如何将C#类型转换为IronRuby类型,反之亦然? - How to convert C# types to IronRuby types and vice versa? 在C#中将像素转换为英寸,反之亦然 - Convert Pixels to Inches and vice versa in C# C#-从JSON到键值,反之亦然 - C# - JSON to Key Value & vice versa 如何将 Unix 时间戳转换为 DateTime,反之亦然? - How can I convert a Unix timestamp to DateTime and vice versa? c# - 可以从C#类型转换为System.Type但反之亦然 - c# - can convert from C# type to System.Type but not vice-versa 如何将 IStream(C++) 转换为 System::IO::Stream(c#),反之亦然 - How to convert IStream(C++) to System::IO::Stream(c#) and vice versa 在c#中将包含数组和字典的字符串转换为列表,反之亦然 - Convert the string containing array and dict into the list and vice versa in c#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM