I tried to get my byte[] value from JSONObject using following code but I am not getting original byte[] value.
JSONAr
When inserting a byte array into a JSONObject the toString() method is invoked.
public static void main(String... args) throws JSONException{
JSONObject o = new JSONObject();
byte[] b = "hello".getBytes();
o.put("A", b);
System.out.println(o.get("A"));
}
Example output:
[B@1bd8c6e
so you have to store it in a way that you can parse the String into the original datatype.