3 ms·
In fact the Java Serialization Stream format (contrary to most other serialization formats) is designed such that it has well-defined grammar and you can in the
by dfox 8y ago
In fact the Java Serialization Stream format (contrary to most other serialization formats) is designed such that it has well-defined grammar and you can in theory build parser that creates parse trees given only the definitions of classes involved without running any code from these classes. (ie. the parts that depend on behavior of writeObject()/readObject() are delimited inside the stream and you only need to know whether class implements such methods)
Many other language-specific serialization mechanisms just write arbitrary binary data into stream which can then only be parsed by ad-hoc recursive descent parser implemented by equivalent of java's readObject().