LoginSignup
0
0

More than 5 years have passed since last update.

C# > Json > JsonConvert.DeserializeObject エラーハンドリング

Posted at

忘れるのでメモ

var responseString = ".....json"

//Jsonコンバートする
var response = JsonConvert.DeserializeObject<ObjectClassA>(responseString, new JsonSerializerSettings
{
    Error = (sender, errorArgs) => {
        var currentError = errorArgs.ErrorContext.Error.Message;
        errorArgs.ErrorContext.Handled = true;
    }
});


0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0