I'm trying to pass byte array in json via web service. When i try to Deserialize the JSON the byte array value changed to unknow value.
For an example.
My byte value when i try to pass to webservice using android.
Code
JSONObject object = new JSONObject();
try {
object.put("WayBillNo", bill);
object.put("ReceiverSignature", image);
} catch (JSONException e) {
e.printStackTrace();
}
Image
WebService when trying to serialize the JSON. (C#)
Code
payloadObj = JsonConvert.DeserializeObject<T>( encryptedJson );
Image
Receiversingnature value change in web service.Any advice/help is appreciated.
I use Base64 which converts binary data to a string.
byte [] image = array;
String stringToStore = new String(Base64.encode(image));