This should be simple to do. But just to clarify before giving an answer:
1. If you want to compare the response with an existing content of a file why do you want to save the response to a file. Wouldn't it be simpler to just read the content of the initial file and compare it directly with the current response.
2. I am not aware of the full context of your test but I generally see this kind of tests unreliable. If something is to change in the response you may have to do a lot of rework.
If my answer helped please click on the 'Accept as Solution' button.
@Lucian it works. and now my next question. i have a  in my json. Is there a error/mismatch in the  let me take a example... lets say i have Items and in Itmes i have a OID = 123456, Name = XYZ for now the test can say me there is a error/mismatch in ITEMS but not where. It cant say error or mismatch in Items>OID.