This is a very basic question. I just want to display a test batch of JSON with PHP, but I think I don't have the correct formatting, since the data received looks garbled when outputed, and it causes a data error if I try to decode it.

gzuncompress is for ZLIB not GZIP. The two algorithms are related, but not identical. gzuncompress isn't strictly guaranteed to decompress all ZLIB streams actually, its just guaranteed to decode the results of gzcompress. Which is honestly really weird.