Object serialization XML vs java serialization

Discussion in 'Java' started by plasticfloor, Jun 13, 2006.

  1. plasticfloor

    plasticfloor Guest

    I was wondering are there really advantages to using XML serialization
    for object or is it just an xml hype?
    plasticfloor, Jun 13, 2006
    1. Advertisements

  2. I use XML serialization because
    it's no more difficult than binary serialization,
    I can read (view directly) the results as text when needed,
    I can manually edit the serialized data
    I can transform serialized data using XSL
    I worry less that changes to Java will invalidate the serialization
    It transfers easily across HTTP
    I usually (but not always) don't care that it might be larger or a
    little slower

    Matt Humphrey http://www.iviz.com/
    Matt Humphrey, Jun 13, 2006
    1. Advertisements

  3. Seconded, plus:

    it allows for schema evolution (i.e. should we later change the class,
    we can easily change the XML to suit the new version).

    Its JVM version independent.
    Andrew McDonagh, Jun 13, 2006
  4. plasticfloor

    hawat.thufir Guest

    Matt Humphrey wrote:

    Not that you'd often want to, but that capability sounds good :)

    hawat.thufir, Jun 14, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.