JSON config parser to consume till end of file

This makes sure there isn't garbage after the JSON in config.
It also makes sure we consume the lazy bytestring from the config file fully so the file is closed ASAP.