bos/aeson — pull request #130 by Peaker (2013-07-09 00:13:23+00:00)
Title: Fix lazy I/O leak and trailing garbage ignore bug in decode functions

The decode family of functions ignore the rest-of-bytestring immediately following the JSON in the string.

This causes 2 problems:

1) Any time a file/string is decoded, any trailing garbage after the JSON will be completely ignored. Even mismatched braces could cause a JSON to be early-terminated (without a syntax error) and some of the JSON content can be silently ignored.

2) When using lazy I/O to generate the bytestring, the bytestring will *never* be fully read, which will mean that even fully forcing the decode result, the file handle will necessarily leak (until GC kills the bytestring).