dotnetcore / WebApiClient

A REST API library with better functionality, performance, and scalability than refit
https://webapiclient.github.io/
MIT License
2.06k stars 444 forks source link

JsonContent 特性问题 #220

Closed JoraNoe closed 1 year ago

JoraNoe commented 1 year ago

WebApiClient.HttpApiException: 执行CreateBatchInvoiceNew出现JsonSerializationException异常 ---> Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.IList`1[System.String]' 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) 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 'Data.Data', line 1, position 79. at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)

这是错误内容

EzrealJ commented 1 year ago

Duplicate Issue