Add return types to the example about serialization