bytearray - RestSharp deserialize JSON content(represent an object contains an byte array) error -
the client side receives formal json content "{\"id\":[1,2,3],\"size\":56}", error in deserialization byte array.
1 error occurs in statement below
irestresponse<key> response = client.execute<key>(request); 2 error message "no parameterless constructor defined object."
3 object class in client size same it's in server side:
public class key { public byte[] id { get; set; } public int size { set; get; } } 4 i've tried passing object contains string , integer json format , that's fine byte array.
jsondeserializer restsharp can not deserialize array. instead of byte[] use list<byte>. more information see https://github.com/restsharp/restsharp/wiki/deserialization
Comments
Post a Comment