一个非常简单的 C# JSON 解析器,仅有 350 行代码
A really simple C# JSON parser in ~350 lines
"[1,2,3]".FromJson>() APIclass Foo
{
public int Value;
}
"{\"Value\":10}".FromJson()Dictionary and Listvar test = "{\"Value\":10}".FromJson();
int number = ((Dictionary)test)["Value"];[IgnoreDataMember] and [DataMember(Name="Foo")] to ignore vars and override the default nameLimitations:
Save this as `JsonTest.cs` then compile and run with `mcs JsonTest.cs && mono JsonTest.exe`
## Installation
Simply copy and paste the [JSON Parser](https://raw.githubusercontent.com/zanders3/json/master/src/JSONParser.cs) and/or the [JSON Writer](https://raw.githubusercontent.com/zanders3/json/master/src/JSONWriter.cs) into your project. I also provide NuGet but I recommend the copy paste route ;)暂无开放 Issues,或尚未同步最近议题。