将xml序列化为json [英] Serialize the xml to json
问题描述
< root>< application appcode =2description =访问权限checked =truecurrent =trueexpanded =trueleaf =false>< application appcode =32 description =ASP EAF报告checked =falsecurrent =falseexpanded =trueleaf =false>< application appcode =157description =Beam Blank Taggingchecked =false current =falseexpanded =trueleaf =false>< application appcode =7description =Bloom Yard1checked =falsecurrent =falseexpanded =trueleaf = false>
将xml序列化为json和json字符串应该具有布尔值true或false而不带任何引号。如何实现这个?
<root><application appcode="2" description="Access Rights" checked="true" current="true" expanded="true" leaf="false"><application appcode="32" description="ASP EAF Reports" checked="false" current="false" expanded="true" leaf="false"><application appcode="157" description="Beam Blank Tagging" checked="false" current="false" expanded="true" leaf="false"><application appcode="7" description="Bloom Yard1" checked="false" current="false" expanded="true" leaf="false">
Serialize xml to json and json string should have boolean true or false without any quotation. How to implement this?
推荐答案
请你试试这个!! :)
http:// stackoverflow.com/questions/18503845/convert-json-to-xml-using-javascriptserializer-in-c-sharp [ ^ ]
can you try this please !! :)
http://stackoverflow.com/questions/18503845/convert-json-to-xml-using-javascriptserializer-in-c-sharp[^]
这篇关于将xml序列化为json的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!