Code

store: Fixed JSON for serialized time-series.
authorSebastian Harl <sh@tokkee.org>
Fri, 19 Sep 2014 03:38:46 +0000 (20:38 -0700)
committerSebastian Harl <sh@tokkee.org>
Fri, 19 Sep 2014 03:38:46 +0000 (20:38 -0700)
Each field needs a name, add the name to the "data" field.

src/core/store.c

index 401780e054bad02bf160bb807a971f02af0808a7..e14f27c0e4141482c4edea27f59eca97bc4abdcb 100644 (file)
@@ -555,7 +555,7 @@ ts_tojson(sdb_timeseries_t *ts, sdb_strbuf_t *buf)
                snprintf(end_str, sizeof(end_str), "<error>");
        end_str[sizeof(end_str) - 1] = '\0';
 
-       sdb_strbuf_append(buf, "{\"start\": \"%s\", \"end\": \"%s\", {",
+       sdb_strbuf_append(buf, "{\"start\": \"%s\", \"end\": \"%s\", \"data\": {",
                        start_str, end_str);
 
        for (i = 0; i < ts->data_names_len; ++i) {