U3d,解析jsondata提示错误.InvalidCastException: Instance of JsonData doesn't hold an int LitJson.JsonData.
来源:互联网 发布:中超数据库门将 编辑:程序博客网 时间:2024/06/17 04:43
在做项目的时候,需要用 jsonWriter和JsonData做数据保存.
w.WritePropertyName("mStoneLevel");
w.Write(s.mStoneLevel.ToString());
mStoneLevel是Int所以会包下面的错.
InvalidCastException: Instance of JsonData doesn't hold an int LitJson.JsonData.op_Explicit (LitJson.JsonData data)
解决方法:去到注册表,把之前用jsonWriter保存的数据删除掉,然后去掉ToString().再重新运行就好了.
原因就是本应该是int的你保存成了string型,所以解析的时候出现错误.
1 0
- U3d,解析jsondata提示错误.InvalidCastException: Instance of JsonData doesn't hold an int LitJson.JsonData.
- JsonData
- LitJson库中JsonMapper.ToJson中如果存在JsonData结构导致解析失败
- AJAX提交JSONData到服务端
- jsonData的若干细节问题
- FusionCharts 入门例子(JsonData)
- flex Tree xmlNode jsonData,更换treeData
- JSONString 与 JSONData 与字典或者数组互相转化
- JSONString 与 JSONData 与字典或者数组互相转化
- iOS字典转字符串类型,NSDictionary 转 NSString转JsonData
- unity中JsonData中的json数据转换成普通数据类型的方法
- int [] is an instance of Object
- 遇到错误 org.hibernate.HibernateException: identifier of an instance of XXX was altered from X to X 将int
- 错误提示:No enclosing instance of type A is accessible. Must qualify the allocation with an enclosing
- An unhandled exception of type "System.InvalidCastException" occurred
- Why doesn't incrementing Nullable<int> throw an exception?(stackoverflow)
- must be an instance of com.sun错误的解决
- u3d 工具错误提示
- 《信息传奇》第五集
- 在VS2010中安装MSDN
- 《算法竞赛入门经典2ndEdition 》例题3-1 TeX中的引号(Tex Quotes, Uva 272)
- protel99se进阶视频教程(手把手教你画51单片机开发板)
- linux下 mysql字符集的修改
- U3d,解析jsondata提示错误.InvalidCastException: Instance of JsonData doesn't hold an int LitJson.JsonData.
- 使用Anemometer基于pt-query-digest将MySQL慢查询可视化
- awk&sed日常用法记录
- 类别和继承的区别
- linux 常用调试命令
- 实现Android图片轮播
- 英语速成的窍门—你需要掌握这些【胶水词】
- Java基础一
- Java数字时钟