学习unity之JSON的开发—JSON的介绍、生成、解析
---恢复内容开始---
一、JSON简介:
JSON是纯文本,是一种轻量级的数据交换格式,它具有层级结构(值中存值)。它和xml相似,都可以存储和传递数据。

二、JSON开发使用的类库
1、System.Json(便于JSON生成):需要将System.Json.dll放入到Assets文件夹下

2、LitJson(便于JSON解析):需要将LitJson.dll放入到Assets文件夹下

string nuo =Application.dataPath + "/nuoke.json";
StreamReader mybuo = new StreamReader (nuo);
JsonReader reader = new JsonReader (mybuo);
while (reader.Read()) {
Debug.Log (reader.Value);
}
---恢复内容结束---
浙公网安备 33010602011771号