Compress code/data into a JSON-compatible object