美文网首页
JsonException01:

JsonException01:

作者: 浪荡少年 | 来源:发表于2019-07-13 16:25 被阅读0次

一、

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

Json不能识别float数据类型,请转化成double!!!!!

二、

JsonException: Can't assign value '0' (type System.Int32) to type System.Int64

需在JsonMapper这个类中的RegisterBaseImporters方法中添加

RegisterImporter<int, long>((int value) =>

{

    return (long)value;

});

放到方法最后面就好了

相关文章

  • JsonException01:

    一、 JsonException: Max allowed object depth reached while ...

网友评论

      本文标题:JsonException01:

      本文链接:https://www.haomeiwen.com/subject/pkdmkctx.html