commit | b3b540e20e0ac49a1c6ab1c2f45d023c956e6424 | [log] [tgz] |
---|---|---|
author | David Ostrovsky <david@ostrovsky.org> | Wed Feb 19 00:13:28 2014 +0100 |
committer | Edwin Kempin <edwin.kempin@gmail.com> | Thu Feb 20 08:38:15 2014 +0000 |
tree | 2dc500fff60a2701c9f8730ee28d6c4e0a68c772 | |
parent | bf37c0c1ecb4efe16b9cb9cd483e7f907e4307b5 [diff] |
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