Resolve #27 - Valid JSON output is not formatted.  Was checking the wrong object for json validity