From 9e2ae3f101b8cb51032dc2b04958bec2a8a9d391 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sun, 5 Mar 2023 18:30:47 +0100 Subject: [PATCH] Update example --- example/ex11-json-net.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/example/ex11-json-net.c b/example/ex11-json-net.c index 6e8f0208..f179f50b 100644 --- a/example/ex11-json-net.c +++ b/example/ex11-json-net.c @@ -14,13 +14,15 @@ int main(void) string_t buffer; m_serial_return_code_t status; + /* Let's define a string 'buffer' that will receive the JSON representation of our message*/ string_init(buffer); + /* Encode our message */ { SimpleMessage_t message; SimpleMessage_init(message); - /* Create a stream that will write to our buffer. */ + /* Create a stream that will write to our string buffer. */ m_serial_str_json_write_t stream; m_serial_str_json_write_init(stream, buffer); @@ -43,6 +45,7 @@ int main(void) } /* Now we could transmit the message over network, store it in a file + * It is represented in a string 'buffer' * but we are doing it right now. */