Monday, September 13, 2010

Passing a Byte Array through JSON

Its a well known issue when communicating complex structures between client and server, using the JSON encoding.
I've encountered it when attempting to transfer an encrypted Byte Array back and forth between a client and server, that communicate via JSON.

What doesn't work:
Base64 encodings and conversions to string formats

What does work:
Converting the Byte[] to a number array and back

Here is an example code in Flex (works just as well in Java / PHP / Python etc)






















Independent on Sundays

No comments:

Post a Comment

Please do not post spam on this blog, Spam sites will be reported to google.
thank you kindly.