Serialization best practices
This section briefly summarizes the best practices for serializing and deserializing data. These practices will help you to maintain and evolve your data schemas over time, as well as make them easy to use:
- Keep your schema backward compatible: Avoid making any changes in your data schema that would break any existing callers. Such changes include making modifications (renaming or removing) to field names and types.
- Ensure that data schemas are kept in sync between clients and servers: For serialization formats with explicit schema definitions, such as Apache Thrift, Protocol Buffers, and Apache Avro, you should keep clients and servers in sync with the latest schema versions.
- Document implicit details: Let the callers know any implicit details related to your data schema. For example, if your API does not allow an empty value of a certain field of a structure, include this in the comments in the schema file.
- Use built-in structures...