---恢復內容開始---
一、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);
}
---恢復內容結束---