Another solution is to simply eliminate print_json_request by printing json_pretty_text here, and then doing decref()