You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "martin-g (via GitHub)" <gi...@apache.org> on 2023/03/23 09:45:09 UTC

[GitHub] [avro] martin-g commented on a diff in pull request #2161: AVRO-3724 Fix C# JsonEncoder for nested array of records

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


##########
lang/csharp/src/apache/test/IO/JsonCodecTests.cs:
##########
@@ -285,6 +286,28 @@
             decoder.SkipArray();
         }
 
+        [Test]
+        public void TestJsonDecoderSpecificWithArray()
+        {
+            Root data = new Root();
+            Item item = new Item { id = 123456 };
+            data.myarray = new List<Item> { item };
+
+            DatumWriter<Root> writer = new SpecificDatumWriter<Root>(data.Schema);
+
+            ByteBufferOutputStream bbos = new ByteBufferOutputStream();
+
+            Encoder encoder = new JsonEncoder(data.Schema, bbos);
+            writer.Write(data, encoder);
+            encoder.Flush();
+
+            List<MemoryStream> listStreams = bbos.GetBufferList();
+
+            StreamReader reader = new StreamReader(listStreams[0]);

Review Comment:
   @rayokota Should we fix this warning ?



-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org