@Override public Span read(Kryo kryo, Input input, Class<? extends Span> type) {
      int length = input.readInt();
      byte[] json = input.readBytes(length);
      return SpanBytesDecoder.JSON_V2.decodeOne(json);
    }
Example test for how to use Kryo and reuse our encoders
zipkin/src/test/java/zipkin2/codec/KryoTest.java