I started implementing Serializable objects for the server part of my project. Everything worked fine, I was able to load and save objects to the filesystem… until I wanted to serialize a Vector. I started investigating and noticed they don’t use Java’s Serialization system, but something internal to SpiderMonkey.
I have a few questions about this :
Why aren’t Vectors, and other objects, Serializable ?
Should I implement SpiderMonkey (the Network interfaces) instead of Java’s Serialization ?
If yes, how ? I don’t find any precise documentation in the wiki.
Can SpiderMonkey Serialize data to the filesystem, using a stream ?
I’m a bit confused because Java had a very simple to use system .
Its different requirements, on the one side you want to be able to store and recreate a complete scene and link it to existing data, on the other side you want to transfer self-contained bits of data between scenes. Since the process of loading and saving a scene involves pretty specific requirements “faking” general compatibility of some kind and working around implementation details of an existing serialization system would really not be a benefit, rather the opposite.