improve json handling of empty arrays/objects

Since `{}` outputs as `{}`, and `%{}` as `{}`, it's
inconsistent for `[{}]` to output as `[]`.

Also `[]` should definitely be read as `[%{}]`.

This PR fixes these problems. I added a 'root'
type to the JSON which is either object or array. It seemed
issue two stemmed from having array as a type of object.

This is per JSON spec I believe: http://jsonlint.com/ etc expects
either { or [ as first character of JSON. Strictly I think a JSON
string has to be a minimum of 2 bytes to be valid, but I didn't
want to change anything else.

I also bumped the version number, and changed a depreciated function
(to_char_list!).