I'm receiving a JSON object that has a byte array in it in a string format because of limitations of my system. It's only for testing something.
I get the string in question "[ 1, 2, 3, 4]" for example in android and want to transform it so I end up with byte[] data = [ 1, 2, 3, 4] .
Using getBytes obviously doesn't return what I'm looking for and I'm kinda clueless as to what can be done here. Help would be greatly appreciated!
Edit : I just parsed the string to get the each integer in an array of ints. Is there a way to put that into a byte array easily?
Thanks