diff options
Diffstat (limited to 'gpsd_json.c')
-rw-r--r-- | gpsd_json.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gpsd_json.c b/gpsd_json.c index 4840c389..22fb6f32 100644 --- a/gpsd_json.c +++ b/gpsd_json.c @@ -735,12 +735,12 @@ void json_raw_dump(const struct gps_data_t *gpsdata, } (void)strlcpy(reply, "{\"class\":\"RAW\",", replylen); if (gpsdata->dev.path[0] != '\0') - str_appendf(reply, replylen, - "\"device\":\"%s\",\"time\":%ld,\"nsec\":%9ld,", - gpsdata->dev.path, (long)gpsdata->raw.mtime.tv_sec, - gpsdata->raw.mtime.tv_nsec); + str_appendf(reply, replylen, "\"device\":\"%s\",", gpsdata->dev.path); + + str_appendf(reply, "\"time\":%ld,\"nsec\":%9ld,\"rawdata\":[", + replylen, (long)gpsdata->raw.mtime.tv_sec, + gpsdata->raw.mtime.tv_nsec); - (void)strlcat(reply, "\"rawdata\":[", replylen); for (i = 0; i < MAXCHANNELS; i++) { bool comma = false; if (0 == gpsdata->raw.meas[i].svid) { |