diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-12-01 23:40:12 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-12-01 23:40:12 +0000 |
commit | 8682babcce49715b1ffc629b55da61e3e1789b0a (patch) | |
tree | 15c67c8259a92553987b73d9bf15d3c239251f1f /gpspipe.c | |
parent | b825233926b52de5880ca5f459979c81182f9151 (diff) | |
download | gpsd-8682babcce49715b1ffc629b55da61e3e1789b0a.tar.gz |
Emitting well-formed JSON would sure help.
Diffstat (limited to 'gpspipe.c')
-rw-r--r-- | gpspipe.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -227,19 +227,19 @@ int main( int argc, char **argv) */ (void)strlcpy(buf, "?WATCH={", sizeof(buf)); if (watch) - (void)strlcat(buf, "\"enable\"=true,", sizeof(buf)); + (void)strlcat(buf, "\"enable\":true,", sizeof(buf)); else - (void)strlcat(buf, "\"enable\"=false,", sizeof(buf)); + (void)strlcat(buf, "\"enable\":false,", sizeof(buf)); if (raw) /* * Yes, -r invokes NMEA mode rather than proper raw mode. * This emulates the behavior under the old protocol. */ - (void)strlcat(buf, "\"nmea\"=true,", sizeof(buf)); + (void)strlcat(buf, "\"nmea\":true,", sizeof(buf)); if (binary) - (void)strlcat(buf, "\"raw\"=2,", sizeof(buf)); + (void)strlcat(buf, "\"raw\":2,", sizeof(buf)); if (source.device != NULL) - (void)snprintf(buf, sizeof(buf), "\"path\"=\"%s\",", source.device); + (void)snprintf(buf, sizeof(buf), "\"path\":\"%s\",", source.device); if (buf[strlen(buf)-1] == ',') buf[strlen(buf)-1] = '\0'; (void)strlcat(buf, "}\r\n", sizeof(buf)); |