LitJson
天富儿
这个作者很懒,什么都没留下…
展开
-
关于使用LitJson解析数据注意事项
关于使用LitJson解析数据注意事项注意事项示例注意事项Litjson不支持float类型的数据解析,只支持double,所以需要进行转换(double转float)。LitJson可以对具有继承关系的类进行解析。Json文件里面的属性应该和类的属性名字保持一致。示例根据上面的事项对照下面的示例,可以更好的进行理解。例一:存有二维数组的对象代码中的对象:public class PartInfoData{ public int[][] PartsGroup;}对应原创 2020-10-14 20:22:07 · 996 阅读 · 0 评论 -
Unity使用LitJson保存数据报错:Max allowed object depth reached while trying to export from type System.Single
在进行类转json字符串时,报错:JsonException: Max allowed object depth reached while trying to export from type System.Single。ok,实际上是类的属性中有json不能识别的数据类型。JsonData可以解析的数据类型包括如下:public JsonData(bool boolean);public JsonData(double number);public JsonData(int number转载 2020-09-02 22:44:53 · 2548 阅读 · 1 评论 -
Unity使用LitJson解析报错:JsonException: Invalid character ‘‘ in input string
Unity使用LitJson解析报错:JsonException: Invalid character '' in input string报错现象解决UTF-8与UTF-8 BOM一、一个汉字在不同的编码方式中占多少字节?二、UTF-8与UTF-8 BOM三、创建UTF-8(而非UTF-8 BOM)文件的方法参考文档报错现象我在Unity中使用LitJson.dll解析json文件,报如下错误:JsonException: Invalid character ‘’ in input strin原创 2020-08-31 23:04:52 · 5453 阅读 · 1 评论