report json syntax

This commit is contained in:
James Cherry 2020-07-07 17:08:17 -07:00
parent 79f3de683c
commit 64a196da75
1 changed files with 8 additions and 5 deletions

View File

@ -2551,11 +2551,11 @@ ReportPath::reportPathJson(const Path *path,
network_->location(pin, x, y, exists); network_->location(pin, x, y, exists);
if (exists) { if (exists) {
result += " \"x\": "; result += " \"x\": ";
stringPrint(tmp, "%.6f", x); stringPrint(tmp, "%.9f", x);
result += tmp + ",\n"; result += tmp + ",\n";
result += " \"y\": "; result += " \"y\": ";
stringPrint(tmp, "%.6f", y); stringPrint(tmp, "%.9f", y);
result += tmp + "\n"; result += tmp + ",\n";
} }
result += " \"arrival\": "; result += " \"arrival\": ";
@ -2564,9 +2564,12 @@ ReportPath::reportPathJson(const Path *path,
result += " \"slew\": "; result += " \"slew\": ";
stringPrint(tmp, "%.3e", path->slew(this)); 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";
result += "}\n"; result += "}\n";