static byte[] legacyEndpointBytes(@Nullable Endpoint localEndpoint) {
    if (localEndpoint == null) return null;
    byte[] result = new byte[endpointSizeInBytes(localEndpoint, true)];
    V2SpanWriter.writeEndpoint(localEndpoint, WriteBuffer.wrap(result), true);
    return result;
  }
This type is only used to backport the v1 read api as it returns v1 json.
zipkin/src/main/java/zipkin2/internal/V1SpanWriter.java