Whats the sense behind serializing?
Serialization is the transformation of an object into a stream of bytes that can be used to reconstruct the object later on. It's commonly seen in networking (when you want to transfer an object from one client to another) and - like here - to store data.
But in the save and reading step the serializing step wasnt used any more.
That's not true, it is used:
# Call the node's save function
var node_data = node.call("save")
The save
-method of a node determines which information about the node is saved and how it is labeled. If you only want to store one variable, you don't need to this: you can simply write it's value into a file and load the file content if the file exists. However, if you store multiple things in the same file, it's a lot easier to organize the content in a hierarchy and label stuff for easier excess then "remembering" what the value in line 43 of your savefile is supposed to mean. The save
-method does exactly that by grouping all save-worthy information about a certain node in a dictionary.