码迷,mamicode.com
首页 > Web开发 > 详细

JsonException: Max allowed object depth reached while trying to export from type System.Single

时间:2015-01-26 17:19:17      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:

在进行类转json字符串时,报错JsonException: Max allowed object depth reached while trying to export from type System.Single。

ok,实际上是类的属性中有json不能识别的数据类型,我这里就脑残的float。去除掉之后就ok了。

(备注:用的是LitJson)

那一般什么类型是允许的呢?

我在JsonData类中找到了答案。

        public JsonData(bool boolean);
        public JsonData(double number);
        public JsonData(int number);
        public JsonData(long number);
        public JsonData(object obj);
        public JsonData(string str);

所以去除掉float吧!

JsonException: Max allowed object depth reached while trying to export from type System.Single

标签:

原文地址:http://blog.csdn.net/lihuozhiling0101/article/details/43152813

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!