Annotation based serialization for multiple frameworks