examples: annotate examples
[nit.git] / src / examples / nitwebcrawl.nit
index 1187476..767e64c 100644 (file)
@@ -13,9 +13,9 @@
 # limitations under the License.
 
 # Crawler on the nitweb web API
-module nitwebcrawl
+module nitwebcrawl is example
 
-import json
+import json::static
 
 # Download a HTTP resource
 fun curl(url: String): String do
@@ -32,7 +32,7 @@ fun curl(url: String): String do
 end
 
 # Recursively collect all string values in a json value associated to a given key.
-fun search_json(json: nullable Jsonable, key: String, result: nullable Array[String]): Array[String]
+fun search_json(json: nullable Serializable, key: String, result: nullable Array[String]): Array[String]
 do
        if result == null then result = new Array[String]
        if json isa JsonObject then