guedes/exjson — pull request #29 by timruffles (2014-06-13 15:20:38+00:00)
Title: improve json handling of empty arrays/objects

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

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

This PR fixes these problems (#21, #26). I added a 'root'
type to the grammar 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!).