Example #1
0
 private static void WriteMember(
     IObjectWriter writer,
     int memberKey,
     SimpleObject[][] array)
 {
     writer.WriteStartMember(memberKey);
     if (array == null)
     {
         writer.WriteNullValue();
     }
     else
     {
         writer.WriteStartArray();
         foreach (var nestedArray in array)
         {
             if (null == nestedArray)
             {
                 writer.WriteNullValue();
             }
             else
             {
                 writer.WriteStartArray();
                 foreach (var value in nestedArray)
                 {
                     SimpleObject.WriteTo(writer, value);
                 }
                 writer.WriteEndArray();
             }
         }
         writer.WriteEndArray();
     }
     writer.WriteEndMember();
 }
Example #2
0
        private static void WriteMember(
            IObjectWriter writer,
            int memberKey,
            SimpleObject[] array)
        {
            writer.WriteStartMember(memberKey);

            if (null == array)
            {
                writer.WriteNullValue();
            }
            else
            {
                writer.WriteStartArray();
                foreach (SimpleObject simpleObject in array)
                {
                    SimpleObject.WriteTo(writer, simpleObject);
                }
                writer.WriteEndArray();
            }
            writer.WriteEndMember();
        }