KalleOlaviNiemitalo commented on code in PR #3375:
URL: https://github.com/apache/avro/pull/3375#discussion_r2188162577


##########
lang/c/src/value-json.c:
##########
@@ -29,7 +29,7 @@
 #include "jansson.h"
 
 /*
- * Converts a binary buffer into a NUL-terminated JSON UTF-8 string.
+ * Converts a binary buffer into a JSON UTF-8 string which is not NULL 
terminated!

Review Comment:
   This comment is a bit misleading.   `encode_utf8_bytes` does not encode 
control characters as `\u0001` etc. like JSON requires, so the result isn't 
really a "JSON UTF-8 string".
   
   I'd prefer "null-terminated" to "NULL-terminated" because the `NULL` macro 
in \<stddef.h\> is intended as a pointer rather than a character.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to