I'm not sure you are really going to gain that much by using JSON instead of XML.
ByteArrays have built-in compression as you mention (I think the compression algorithm zlib). Since XMLs generally have a fair amount of redundancy, it will probably reduce the size of your data (in bytes) considerably. To be safe, encode the bytearray to base 64 and store that. Base 64 means 1/3 overhead (for every 3 bytes in, you get 4 bytes out). Still, it'll probably be smaller than the equivalent JSON (though you might want to test it and see if this is true). Cheers Juan Pablo Califano 2010/7/28 Matt Perkins <nudoru.m...@gmail.com> > Wondering if someone has had this problem and found a good solution ... > > I've developed a social simulation that has a lot of data that i need to > save between user sessions in the suspend_data SCORM variable to our LMS. > I'm formatting this data as XML since 1, has a good structure and 2, i know > it. Suspend_data only has 4k of space and my XML (as a string) is pretty big > - doubly so since the LMS encodes it and all of the single char <, > and /'s > get turned into 4 chars. But i've used attributes and 1-2 char tag names > where i can. > > I'm going to try to compress the string with ByteArray and see if that > helps, but I'm not sure if the "special characters" will mess with the LMS > communication - I've had that happen many times before with just HTML page > text. > > Other option is to learn JSON and do it that way. > > Have anyone else faced something like this and solved it? > > -- > Matt Perkins > -------------------- > http://www.nudoru.com > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders