Convert lines of stdin to JSON