8000 Release v0.4.0: improve json handling of empty arrays/objects · guedes/exjson · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

v0.4.0

@timruffles timruffles tagged this 21 Jan 15:47
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!).
Assets 2
Loading
0