LitJson.JsonException: Can't assign value '2347089724' (type System.UInt32) to type System.Int64

 

告诉LitJson一种转换方式:

private static void RegisterBaseImporters ()
{
    //...

    // 拓展;
    RegisterImporter(base_importers_table, typeof(uint), typeof(long), (object value) => { return Convert.ToInt64(value); });
    RegisterImporter(base_importers_table, typeof(long), typeof(double), (object value) => { return Convert.ToDouble(value); });
}

 

posted @ 2020-10-10 09:44  何卫  阅读(974)  评论(0编辑  收藏  举报