Merge: lib/json: fix array serialization
authorJean Privat <jean@pryen.org>
Thu, 9 Mar 2017 15:12:55 +0000 (10:12 -0500)
committerJean Privat <jean@pryen.org>
Thu, 9 Mar 2017 15:12:55 +0000 (10:12 -0500)
Fixes serialization error for array subclasses.

Be the following Nit code:

~~~nit
class Foo
    super Array[String]
    serialize

    var foo: String
end

print (new Foo("foo")).serialize_to_json
~~~

Output before:

~~~json
{"__kind":"obj","__id":0,"__class":"Foo", "__items":, "foo":"foo"[]}
~~~

Output after:

~~~json
{"__kind":"obj","__id":0,"__class":"Foo", "foo":"foo", "__items":[]}
~~~

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

Pull-Request: #2388


Trivial merge