martin-g commented on code in PR #1826:
URL: https://github.com/apache/avro/pull/1826#discussion_r945457612


##########
lang/c++/test/unittest.cc:
##########
@@ -452,7 +457,14 @@ struct TestSchema {
                                             customAttributes);
         std::string expectedJsonWithCustomAttribute =
         "{\"type\": \"record\", \"name\": \"Test\",\"fields\": "
-        "[{\"name\": \"f1\", \"type\": \"long\",\"extra field\": \"1\"}]}";
+        "[{\"name\": \"f1\", \"type\": \"long\", "
+        "\"arrayField\": \"[1]\", "
+        "\"booleanField\": \"true\", "
+        "\"mapField\": \"{\\\"key1\\\":\\\"value1\\\", 
\\\"key2\\\":\\\"value2\\\"}\", "
+        "\"nullField\": \"null\", "
+        "\"numberField\": \"1.23\", "
+        "\"stringField\": \"\\\"field value with \\\"double quotes\\\"\\\"\""

Review Comment:
   The Avro spec does not say anything about the custom attributes/metadata.
   
   Until AVRO-3547 the C++ SDK didn't support it at all. (The Rust SDK still 
does not support this too. I 
[expect](https://github.com/lerouxrgd/rsgen-avro/issues/32#issuecomment-1212123036)
 a user to open a ticket/PR this week).
   With AVRO-3601 we [found 
out](https://github.com/apache/avro/pull/1820#issuecomment-1211711217) that 
using JsonDom.hh for the custom attributes is not recommended, thus the 
string-based approach.
   
   I guess 1.11.2/1.12.0 will be released in several months, so whoever is 
interested in better handling of the custom attributes should step up and do 
it. Here I just tried to fix the broken installation of C++ SDK 1.11.1.



-- 
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