Updated for json and xml test cases.