Validate response from api, echo it with escaping of special characters