JSON: Use browser native JSON object for json serialization

All modern browsers have native support for JSON serialization [1].

Beside being more performant, this approach seems to fix creating
map instead of array problem, so that an array is translated as array

  "foo": ["bar", "baz"]

and not as a map

  "foo": {"0": "bar", "1": "baz"}

That what JsonObject(json).toString() was doing.

[1] http://caniuse.com/json

Change-Id: I516902273669f58234c5598528f0600ceeab65ec
1 file changed