diff --git a/privacy-metrics/disclosure_risk.py b/privacy-metrics/disclosure_risk.py index dfff4426..af9131ec 100644 --- a/privacy-metrics/disclosure_risk.py +++ b/privacy-metrics/disclosure_risk.py @@ -230,7 +230,7 @@ def main(): print(f"\nDisclosure risk metrics: {metrics}") with open(path_released_ds + "/disclosure_risk.json", 'w') as f: - json.dump(metrics, f) + json.dump(metrics, f, indent=4) if __name__=='__main__': main() diff --git a/utility-metrics/sklearn_classifiers.py b/utility-metrics/sklearn_classifiers.py index d708f667..e08965d9 100644 --- a/utility-metrics/sklearn_classifiers.py +++ b/utility-metrics/sklearn_classifiers.py @@ -186,7 +186,7 @@ def utility_measure_sklearn_classifiers(synth_method, path_original_ds, path_ori for iw in warns: print(iw.message) with open(output_file_json, "w") as out_fio: - json.dump(utility_collector, out_fio) + json.dump(utility_collector, out_fio, indent=4) def handle_cmdline_args():