public override bool TryRead(ref ReadOnlySpan <byte> remaining, out List <T> result, PropertyMap propMap = null)
 {
     if (!JsonCollectionReader.TryRead(_serializer, ref remaining, out var resultBuilder, propMap, _innerConverter, _pool))
     {
         result = default;
         return(false);
     }
     if (resultBuilder.Array == null)
     {
         result = null;
     }
     else
     {
         result = new List <T>(resultBuilder.ToArray()); // TODO: This is probably inefficient
     }
     return(true);
 }
 public override bool TryRead(ref ReadOnlySpan <byte> remaining, out T[] result, PropertyMap propMap = null)
 {
     if (!JsonCollectionReader.TryRead(_serializer, ref remaining, out var resultBuilder, propMap, _innerConverter, _pool))
     {
         result = default;
         return(false);
     }
     if (resultBuilder.Array == null)
     {
         result = null;
     }
     else
     {
         result = resultBuilder.ToArray();
     }
     return(true);
 }