Results 1 to 3 of 3
  1. #1
    Wnt2bsleepin is offline Senior Member
    Join Date
    Feb 2012
    Posts
    219
    Rep Power
    3

    Default Changing serialized object's fields

    Hello

    I have managed to code myself into a little bit of a problem. I developed a mod for a game, a simple mod, that saves data in the form of a serialized object. It has two fields, both ints. I however would like to convert them into doubles. The problem is that the data is saved to disk and I don't want existing user's data to be destroyed. Is there some way I can have it converted into doubles that won't break backwards compatibility?

    Here is the page in question.

    Thank you for any help.

  2. #2
    kaydell2 is offline Senior Member
    Join Date
    Dec 2012
    Posts
    107
    Rep Power
    0

    Default Re: Changing serialized object's fields

    Maybe that's a good reason not to use serialization. Maybe XML would be better. I know that you've already used serialization, but I wouldn't mind having a discussion about using XML instead and staying away from serialization.

  3. #3
    Wnt2bsleepin is offline Senior Member
    Join Date
    Feb 2012
    Posts
    219
    Rep Power
    3

    Default Re: Changing serialized object's fields

    Is it too late to convert this all over to XML? I was hoping I could do something simple like add another field that was a double type, and have a method convert it.

Similar Threads

  1. writing and Reading a serialized java object
    By KunCode in forum New To Java
    Replies: 2
    Last Post: 05-20-2012, 06:51 PM
  2. Size of serialized object with null values
    By jamesd128 in forum New To Java
    Replies: 1
    Last Post: 10-22-2010, 06:43 PM
  3. Replies: 0
    Last Post: 08-14-2010, 10:09 AM
  4. Replies: 3
    Last Post: 03-24-2010, 12:24 AM
  5. Replies: 2
    Last Post: 03-08-2010, 10:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •