Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exceptions can Jtoken.ToObject<T>() throw? [closed]

Tags:

json

c#

json.net

Is there a list of exceptions that JToken.ToObject<T>() can throw? Their documentation doesn't mention anything.

var deserialized = myJtoken.ToObject<myType>(); // what can this throw?
like image 440
Gama Avatar asked Mar 08 '26 13:03

Gama


1 Answers

As far as I have examined, according to source code, there are two obvious exceptions:

ArgumentException
ArgumentNotNull

But this may not be a complete list of exceptions, there might be other exceptions within internal methods.

like image 98
Ozan Aydın Avatar answered Mar 10 '26 01:03

Ozan Aydın



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!