public static <T> byte[] writeList(WriteBuffer.Writer<T> writer, List<T> value) {
    if (value.isEmpty()) return new byte[] {'[', ']'};
    byte[] result = new byte[sizeInBytes(writer, value)];
    writeList(writer, value, WriteBuffer.wrap(result));
    return result;
  }
Inability to encode is a programming bug.
zipkin/src/main/java/zipkin2/internal/JsonCodec.java