Newtonsoft.Json.DeserializeObject抛出哪些异常? [英] What exceptions does Newtonsoft.Json.DeserializeObject throw?

查看:351
本文介绍了Newtonsoft.Json.DeserializeObject抛出哪些异常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Newtonsoft.Json.DeserializeObject抛出哪些异常?我要处理它们.

What exceptions does Newtonsoft.Json.DeserializeObject throw? I want to handle them.

http://james.newtonking.com/json/help/?topic = html/M_Newtonsoft_Json_JsonConvert_DeserializeObject.htm#seeAlsoToggle

推荐答案

JSON.NET定义了以下异常:

JSON.NET defines the following exceptions:

  • JsonException
    • JsonReaderException
    • JsonSerializationException
    • JsonWriterException
    • JsonSchemaException
    • JsonException
      • JsonReaderException
      • JsonSerializationException
      • JsonWriterException
      • JsonSchemaException

      序列化或反序列化错误通常会导致JsonSerializationException.

      Serialization or deserialization errors will typically result in a JsonSerializationException.

      这篇关于Newtonsoft.Json.DeserializeObject抛出哪些异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆