*: update redefs of `to_json`
[nit.git] / src / model / model_json.nit
index 2c5cd04..eaa3feb 100644 (file)
@@ -68,7 +68,7 @@ redef class MEntity
                return obj
        end
 
-       redef fun to_json do return json.to_json
+       redef fun serialize_to(v) do json.serialize_to(v)
 
        # Return `self` as a JsonObject with references.
        #
@@ -95,7 +95,7 @@ redef class MDoc
                return obj
        end
 
-       redef fun to_json do return json.to_json
+       redef fun serialize_to(v) do json.serialize_to(v)
 end
 
 redef class Location
@@ -115,13 +115,13 @@ redef class Location
                return obj
        end
 
-       redef fun to_json do return json.to_json
+       redef fun serialize_to(v) do json.serialize_to(v)
 end
 
 redef class MVisibility
        super Jsonable
 
-       redef fun to_json do return to_s.to_json
+       redef fun serialize_to(v) do to_s.serialize_to(v)
 end
 
 redef class MPackage