Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am returning my object from restful service in Json format i.e 'ResponseFormat=WebMessageFormat.Json'.
Object has child properties and one of them is list of byte[](byte array), however i am successfully getting my object from service but not able to get byte array list.
if i am returning only one byte array i am successfully getting it but not the list.
Can anybody tell me what is required setting to return an Object having child property of type byte array list.
Posted

1 solution

byte[] is not a standard data type for json, different serializer may handle/interpret it in different ways.

My fastJSON[^] library converts it to a base64 string.
 
Share this answer
 
Comments
umumbai07 13-Jul-15 8:00am    
Can you explain this with example?
Mehdi Gholam 13-Jul-15 8:06am    
Add the following line :

string str = fastJSON.JSON.ToJSON(yourobjecthere);

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900