How to store json reponse in a variable/cache

that is not a valid json payload coming from a rest api endpoint. please vet that json data in notepad++ or some online json validator.

caching requirement has already been answered for you by @jangaraj