Saves the passed resource to disk, but in JSON format.
This is used with the associative arrays for ecount, as well as for keeping track of viewers.
The associative array to convert into JSON and save.
Filename of the file to write to.
Saves the passed resource to disk, but in JSON format.
This is used with the associative arrays for ecount, as well as for keeping track of viewers.