Added a Fail method and updated Json parsing to use it