From f83c365c722fd4edecb7d83e792e06562ca4c829 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Tue, 16 Feb 2016 06:45:02 +0000 Subject: [PATCH] Improve JSON readability a bit. --- json.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/json.c b/json.c index c02524c..c33a6f0 100644 --- a/json.c +++ b/json.c @@ -12,7 +12,7 @@ void json_init() { static size_t json_hello(char *buf) { int len = snprintf(buf, SERIALIZE_LEN, - "{\"mlat_timestamp_mhz\":%ju,\"mlat_timestamp_max\":%ju,\"rssi_max\":%ju}\n", + "{\"mlat_timestamp_mhz\":%ju, \"mlat_timestamp_max\":%ju, \"rssi_max\":%ju}\n", (uintmax_t) MLAT_MHZ, (uintmax_t) MLAT_MAX, (uintmax_t) RSSI_MAX); @@ -24,7 +24,7 @@ static size_t json_serialize_mode_s_short(struct packet *packet, char *buf) { char hexbuf[14]; hex_from_bin(hexbuf, packet->payload, 7); int len = snprintf(buf, SERIALIZE_LEN, - "{\"payload\":\"%.14s\",\"mlat_timestamp\":%ju,\"rssi\":%ju}\n", + "{\"payload\":\"%.14s\", \"mlat_timestamp\":%ju, \"rssi\":%ju}\n", hexbuf, (uintmax_t) packet->mlat_timestamp, (uintmax_t) packet->rssi); @@ -36,7 +36,7 @@ static size_t json_serialize_mode_s_long(struct packet *packet, char *buf) { char hexbuf[28]; hex_from_bin(hexbuf, packet->payload, 14); int len = snprintf(buf, SERIALIZE_LEN, - "{\"payload\":\"%.28s\",\"mlat_timestamp\":%ju,\"rssi\":%ju}\n", + "{\"payload\":\"%.28s\", \"mlat_timestamp\":%ju, \"rssi\":%ju}\n", hexbuf, (uintmax_t) packet->mlat_timestamp, (uintmax_t) packet->rssi);