From 8682babcce49715b1ffc629b55da61e3e1789b0a Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 1 Dec 2009 23:40:12 +0000 Subject: Emitting well-formed JSON would sure help. --- gpspipe.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gpspipe.c') diff --git a/gpspipe.c b/gpspipe.c index 9eb08064..d07b5db4 100644 --- a/gpspipe.c +++ b/gpspipe.c @@ -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)); -- cgit v1.2.1