Rewriting of the parsons unittest to return a JSON string