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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -