rename `NativeString` to `CString`
[nit.git] / lib / serialization / serialization.nit
index db02122..f94445e 100644 (file)
@@ -92,8 +92,10 @@ end
 abstract class Deserializer
        # Deserialize and return an object, storing errors in the attribute `errors`
        #
+       # If a `static_type` is given, only subtypes of the `static_type` are accepted.
+       #
        # This method behavior varies according to the implementation engines.
-       fun deserialize: nullable Object is abstract
+       fun deserialize(static_type: nullable String): nullable Object is abstract
 
        # Deserialize the attribute with `name` from the object open for deserialization
        #
@@ -237,7 +239,7 @@ redef class Bool super DirectSerializable end
 redef class Char super DirectSerializable end
 redef class Int super DirectSerializable end
 redef class Float super DirectSerializable end
-redef class NativeString super DirectSerializable end
+redef class CString super DirectSerializable end
 redef class Text super DirectSerializable end
 redef class SimpleCollection[E] super Serializable end
 redef class Map[K, V] super Serializable end