Read stdin before passing to JSON decoder.