RestSharp deserialize JSON content(represent an object contains an byte array) error

前端 未结 3 611
夕颜
夕颜 2021-02-18 19:24

The Client side receives a formal JSON content \"{\\\"Id\\\":[1,2,3],\\\"Size\\\":56}\", but get an error in deserialization the byte array.

1 Error occurs

3条回答
  •  悲&欢浪女
    2021-02-18 20:27

    JsonDeserializer from RestSharp can not deserialize array. Instead of byte[] use List. For more information see https://github.com/restsharp/RestSharp/wiki/Deserialization

提交回复
热议问题