List Serialisation
I'm trying to add multiple items to a list by serializing and deserializing to add more items then reserializing it but I think I messed something up cause only one item gets added then when i try and add another it overwrites the original.
9 Replies
this is the only place you add anything to a list
which is the project passed into the method
i literally just fixed it as i sent this ☹️
but thank you for replying
lol
curse of asking for help
no worries
Why are you serializing a list and then immediately deserializing it?
oh i'm working on an app that helps you upload projects to itch.io and i wanted it to save some data on the projects locally
essentially updating the list cause i want the items already in the list to remain so i deserialize the original list then add onto it then reserialize it
i won't speak for the person above, but i'm fairly sure that you can just remove 2 lines of code in what you wrote
you're serializing an empty list, deserializing it into the same empty list, adding something to it, serializing again, then writing it.
The serializing + writing part is fine, but the initial serialize + deserialize is redundant if i'm not mistaken