unity请求json数据并解析
unity3d在跟.net进行http通信的时候,最常见的就是表单数据的提交请求了,但服务器端会返回一坨json数据,这就要求我们在unity中进行json数据的处理了,一般unity中处理json个数数据用的最多的就是LitJSON(它是.net平台下处理SON数据库的类库)。下面我就贴出源码,仅供学习参考! 关于LitJSON的安装和使用,请参考: http://www.360doc.com/content/13/0117/11/10941785_260686840.shtml 或者参考: http://blog.csdn.net/dingxiaowei2013/article/details/17115665 将LitJson.dll放在assets目录下的plugins文件下,如果没有plugins文件就手动创建一个 Client: [csharp] view plain copy print ? using UnityEngine; using System.Collections; using LitJson; public class GetPhotoList : MonoBehaviour { // Use this for initialization void Start () { StartCoroutine(GetPhotos()); } // Update