lib/ai: add the eight-queen problem as an example
[nit.git] / lib / json_serialization.nit
index b361f88..64f3d5f 100644 (file)
@@ -17,7 +17,7 @@
 module json_serialization
 
 import serialization
-import simple_json_reader
+import json::static
 
 class JsonSerializer
        super Serializer
@@ -77,7 +77,7 @@ class JsonDeserializer
 
        var just_opened_id: nullable Int = null
 
-       init(text: String)
+       init(text: Text)
        do
                var root = text.json_to_nit_object
                if root isa HashMap[String, nullable Object] then path.add(root)
@@ -157,7 +157,7 @@ class JsonDeserializer
                                return val.chars.first
                        end
 
-                       print "Malformed Json string: unexpected Json Object kind '{kind}'"
+                       print "Malformed Json string: unexpected Json Object kind '{kind or else "null"}'"
                        abort
                end