# limitations under the License.
# Offers services to serialize a Nit objects to different persistent formats
-module serialization
+module serialization is
+ new_annotation auto_serializable
+end
# Abstract serialization service to be sub-classed by specialized services.
interface Serializer
# Mainly generated method to return the next instance of the givent
# class by name
- fun deserialize_class(class_name: String): Object do abort
+ fun deserialize_class(class_name: String): Object do
+ print "Error: doesn't know how to deserialize class \"{class_name}\""
+ abort
+ end
end
# Instances of this class can be passed to `Serializer::serialize`