Deserializing problem

Issue #496 resolved
Marco Demartino created an issue

Hi,

I am deserializing a class, saving it to file and right after it I am loading and serializing it, but it outputs an error and I can't understand why. The code is available on GitHub https://github.com/SuperMarcomen/SuperLib.
Here is the error: https://pastebin.com/3s3RRbpZ

Even tough there is an error during the serialization, the deserialization works fine, but I would like to change the output a bit, but I can't understand how to do it.

!!it.marcodemartino.superlib.Config
location: {serializedLocation: 'world:0.0:0.0:0.0:0.0:0.0'}
pirla: test

As you can see, SnakeYaml saves the instance of SerializableLocation with the name "location" and then it saves its field "serializedLocation", but I would like to have just a string called "location" as output.

Comments (3)

  1. Andrey Somov

    This is confusing.

    1. you say that that serialisation failed but I do not see a failure
    2. you say deserialization works fine, but I see the exception during deserialization
    3. what you want to get in completely unclear
    4. can you please provide your exact expectation ?
    5. stackoverfow or mailing list is a better place to ask a question (this is an issue tracker, but there is no issue)

  2. Marco Demartino reporter

    Thank you so much for your reply.

    I’m sorry if my request was confusing, I’ve confused “serialization” with “deserialization”.

    I didn’t realize there was a better place to ask my question, therefore I will move it there right now.

  3. Log in to comment