当我尝试加载网站时出现此错误。我正在使用最新版本。
Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'VirtoCommerce.ApiClient.DataContracts.Stores.Store[]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'message', line 2, position 13.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'VirtoCommerce.ApiClient.DataContracts.Stores.Store[]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'message', line 2, position 13.
Source Error:
Line 174: //return await response.Content.ReadAsAsync<T>();
Line 175:
Line 176: var taskObject = await response.Content.ReadAsAsync<T>();
Line 177:
Line 178: // the following will reduce number of serializations
Source File: c:\inetpub\wwwroot\Virto\STOREFRONT\ApiClient\BaseClient.cs Line: 176