Add newlines to avrorouter JSON output

JSON does not have a concept of streams and a common way to stream JSON is
to separate each JSON object with a newline. Adding a newline makes it
easier to parse as JSON values do not natively contain newlines.
This commit is contained in:
Markus Makela
2016-11-28 22:22:09 +02:00
parent 2fe13719bc
commit 9362954e82
2 changed files with 10 additions and 6 deletions

View File

@ -455,7 +455,7 @@ cdc_protocol_done(DCB* dcb)
static void
write_auth_ack(DCB *dcb)
{
dcb_printf(dcb, "OK");
dcb_printf(dcb, "OK\n");
}
/**
@ -467,6 +467,6 @@ write_auth_ack(DCB *dcb)
static void
write_auth_err(DCB *dcb)
{
dcb_printf(dcb, "ERR, code 11, msg: abcd");
dcb_printf(dcb, "ERROR: Authentication failed\n");
}