Re: Which data format for end-to-end application
"C. Enrique Ortiz" <[email protected]>
| Newsgroups | gmane.comp.java.sun.kvm |
|---|---|
| Organization | J2MEDeveloper.com |
| Message-ID | <[email protected]> |
I spent sometime looking into this, into JSON, as I haven't used before for data exchange. I'll say that I actually like JSON due to its simplicity, and its structure, that is based on name/value pairs. There is a good comparisson of JSON vs. XML here: http://www.json.org/xml.html And a JSON parser source code in Java at: http://www.json.org/java/ That said, JSON doesn't seem to support a clear or a good way to represent binary data, such as the images that you want to transport. ceo [email protected] wrote: > Thank you all for your replies and support. > > I'm now hesitating between the pros and cons of JSON vs RMI. > I am going to be sending a lot of images (PNG) to the midlet so the lightest the interchange format, the best. > > >From what I understand (correct me if I'm wrong): > > Using JSON will ensure more portability as the output could be used on other non JAVA based clients as well. BUT it will be heavier in terms of data transfer. > > Using RMI and sending serialized objects directly will be lighter in tems of bandwidth but less portable as the client will inevitably need to be a JAVA client. > > I guess I will go for RMI for now and eventually adapt my server code to provide JSON or XML format when needed. > > Let me know what you think. > [Message sent by forum member 'azpublic' (azpublic)] > > http://forums.java.net/jive/thread.jspa?messageID=237683 > > =========================================================================== > To unsubscribe, send email to [email protected] and include in the body > of the message "signoff KVM-INTEREST". For general help, send email to > [email protected] and include in the body of the message "help". > > -------------------------------- > Spam/Virus scanning by CanIt Pro > > For more information see > http://www.kgbinternet.com/SpamFilter.htm > > To control your spam filter, log in at > http://filter.kgbinternet.com > > > =========================================================================== To unsubscribe, send email to [email protected] and include in the body of the message "signoff KVM-INTEREST". For general help, send email to [email protected] and include in the body of the message "help".