Assuming it's Jython (or Python in general) on both ends, you can use cPickle. Otherwise you might choose PyAMF (good also for Flex clients) or JSON (rather universal coverage at this point).

On Sat, Jul 11, 2009 at 12:24 PM, Carl <> wrote:

I’ve written a Jython socket program that grabs incoming messages and writes them to a database. It works great with my test data.


But now, I want to send a message that contains mixed data types. During testing, I had the luxury of encoding and decoding on both ends, but in this case I can’t do that. For instance, I might have this list of data:




What I want to do is concatenate each item in the list into a string for the socket.send. Note that this needs to be a raw stream of bytes, so converting 100 to a string isn’t possible. Obviously I can’t just use a ‘’.join due to the non-string variables, so I looked at the java libraries and it looks like some combination of jarray, java.lang.string, and outputstream should work. Can someone point me in the right direction?





Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at:
Jython-users mailing list

Jim Baker