diff --git a/Storage/Storage/Internal/Http/LCHttpClient.cs b/Storage/Storage/Internal/Http/LCHttpClient.cs index af4eb76..5a4bb6a 100644 --- a/Storage/Storage/Internal/Http/LCHttpClient.cs +++ b/Storage/Storage/Internal/Http/LCHttpClient.cs @@ -61,7 +61,8 @@ namespace LeanCloud.Storage.Internal.Http { LCHttpUtils.PrintResponse(response, resultString); if (response.IsSuccessStatusCode) { - T ret = JsonConvert.DeserializeObject(resultString, new LCJsonConverter()); + T ret = JsonConvert.DeserializeObject(resultString, + LCJsonConverter.Default); return ret; } throw HandleErrorResponse(response.StatusCode, resultString); @@ -94,7 +95,8 @@ namespace LeanCloud.Storage.Internal.Http { LCHttpUtils.PrintResponse(response, resultString); if (response.IsSuccessStatusCode) { - T ret = JsonConvert.DeserializeObject(resultString, new LCJsonConverter()); + T ret = JsonConvert.DeserializeObject(resultString, + LCJsonConverter.Default); return ret; } throw HandleErrorResponse(response.StatusCode, resultString); @@ -127,7 +129,8 @@ namespace LeanCloud.Storage.Internal.Http { LCHttpUtils.PrintResponse(response, resultString); if (response.IsSuccessStatusCode) { - T ret = JsonConvert.DeserializeObject(resultString, new LCJsonConverter()); + T ret = JsonConvert.DeserializeObject(resultString, + LCJsonConverter.Default); return ret; } throw HandleErrorResponse(response.StatusCode, resultString); @@ -150,7 +153,8 @@ namespace LeanCloud.Storage.Internal.Http { LCHttpUtils.PrintResponse(response, resultString); if (response.IsSuccessStatusCode) { - Dictionary ret = JsonConvert.DeserializeObject>(resultString, new LCJsonConverter()); + Dictionary ret = JsonConvert.DeserializeObject>(resultString, + LCJsonConverter.Default); return; } throw HandleErrorResponse(response.StatusCode, resultString); @@ -161,7 +165,8 @@ namespace LeanCloud.Storage.Internal.Http { string message = responseContent; try { // 尝试获取 LeanCloud 返回错误信息 - Dictionary error = JsonConvert.DeserializeObject>(responseContent, new LCJsonConverter()); + Dictionary error = JsonConvert.DeserializeObject>(responseContent, + LCJsonConverter.Default); code = (int)error["code"]; message = error["error"].ToString(); } catch (Exception e) {