Java Serialization Format
Spec overview
Fory Java Serialization is an automatic object serialization framework that supports reference and polymorphism. Fory will convert an object from/to fory java serialization binary format. Fory has two core concepts for java serialization:
- Fory Java Binary format
- Framework to convert object to/from Fory Java Binary format
The serialization format is a dynamic binary format. The dynamics and reference/polymorphism support make Fory flexible, much more easy to use, but also introduce more complexities compared to static serialization frameworks. So the format will be more complex.
Here is the overall format:
| fory header | object ref meta | object class meta | object value data |
The data are serialized using little endian byte order overall. If bytes swap is costly for some object, Fory will write the byte order for that object into the data instead of converting it to little endian.