使用的库为 newtonsoft.Json 。
github链接:https://github.com/JamesNK/Newtonsoft.Json
简单地加载到Unity编辑器内:
Window => PackageManager => 左上角的 + => Add Package from git URL
输入 com.unity.nuget.newtonsoft-json 加载即可。
示例:
Dictionary<string, string> Dict = JsonConvert.DeserializeObject<Dictionary<string, string>>(jsonText);