Add JSON parser to spec helpers & refactor tests