From f55bf4f99c0aeabed7fc521ec2c7bdc600cd51f1 Mon Sep 17 00:00:00 2001 From: "Emden R. Gansner" Date: Tue, 9 Feb 2016 16:58:02 -0500 Subject: [PATCH] Reformat points field with different name and separate x and y into points. --- plugin/core/gvrender_core_json.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/core/gvrender_core_json.c b/plugin/core/gvrender_core_json.c index 8213db5dd..7fd58b0c7 100644 --- a/plugin/core/gvrender_core_json.c +++ b/plugin/core/gvrender_core_json.c @@ -153,10 +153,10 @@ static void write_polyline (GVJ_t * job, xdot_polyline* polyline) int cnt = polyline->cnt; xdot_point* pts = polyline->pts; - gvprintf(job, "\"pts\" : ["); + gvprintf(job, "\"points\" : ["); for (i = 0; i < cnt; i++) { if (i > 0) gvprintf(job, ","); - gvprintf(job, "%.03f,%.03f", pts[i].x, pts[i].y); + gvprintf(job, "[%.03f,%.03f]", pts[i].x, pts[i].y); } gvprintf(job, "]\n"); } -- 2.50.1