From 64a196da75f08da7370d7c535d82bcbdb8e997b5 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Tue, 7 Jul 2020 17:08:17 -0700 Subject: [PATCH] report json syntax --- search/ReportPath.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/search/ReportPath.cc b/search/ReportPath.cc index 293554ac..b16fda52 100644 --- a/search/ReportPath.cc +++ b/search/ReportPath.cc @@ -2551,11 +2551,11 @@ ReportPath::reportPathJson(const Path *path, network_->location(pin, x, y, exists); if (exists) { result += " \"x\": "; - stringPrint(tmp, "%.6f", x); + stringPrint(tmp, "%.9f", x); result += tmp + ",\n"; result += " \"y\": "; - stringPrint(tmp, "%.6f", y); - result += tmp + "\n"; + stringPrint(tmp, "%.9f", y); + result += tmp + ",\n"; } result += " \"arrival\": "; @@ -2564,9 +2564,12 @@ ReportPath::reportPathJson(const Path *path, result += " \"slew\": "; stringPrint(tmp, "%.3e", path->slew(this)); - result += tmp + ",\n"; + result += tmp + "\n"; - result += " }\n"; + result += " }"; + if (i < expanded.size() - 1) + result += ","; + result += "\n"; } result += " ]\n"; result += "}\n";