文件名称:CerealBox:动态到 XMLJSON 序列化和 XMLJSON 动态解析器
文件大小:253KB
文件格式:ZIP
更新时间:2024-07-03 20:01:20
C#
将 JSON 或 XML 转换为动态: var json = @"{""animals"":{""badger"":{""name"":""Steve Badger"",""age"":3},""dog"":[{""name"":""Rufus"",""breed"":""labrador""},{""name"":""Marty"",""breed"":""whippet""}],""cat"":{""name"":""Matilda""}}}"; dynamic dynamic = json.ToDynamic(); 检索属性: string name = dynamic.animals.badger.name; Assert.AreEqual("Steve Badger", name); 检索数组: dynamic[] dogs = dynamic.animals.dog
【文件预览】:
CerealBox-master
----.gitignore(1KB)
----src()
--------CerealBox.Tests()
--------CerealBox()
----LICENCE.txt(1KB)
----README.md(932B)
----CerealBox.sln(1KB)
----.nuget()
--------NuGet.exe(636KB)
--------NuGet.Config(164B)
--------NuGet.targets(4KB)
----MyGet.sln(901B)