I'm pulling JSON from Instagram:
$instagrams = json_decode($response)->data;
Then parsing variables into a PHP array to restructure the data, then re-encoding and caching the file:
When I open the cache file all my forward slashes "/" are being escaped:
I gather from my searches that
json_encode() automatically does this...is there a way to disable it?
I had to encounter a situation as such, and simply, the
did work for me.
On the flip side, I was having an issue with PHPUNIT asserting urls was contained in or equal to a url that was json_encoded -
would be encoded to:
If you need to do a comparison, transforming the url using:
allowed for the proper output during my comparisons.