class EishayParseBinary {
    static MediaContent mc;
    static byte[] fastjson2UTF8Bytes;
    static byte[] fastjson2JSONBBytes;
    static byte[] hessianBytes;
    static byte[] javaSerializeBytes;
    private static final ThreadLocal<Kryo> kryos = new ThreadLocal<Kryo>() {
        protected Kryo initialValue() {
            Kryo kryo = new Kryo();
            kryo.register(MediaContent.class);
            kryo.register(ArrayList.class);
            kryo.register(Image.class);
            kryo.register(Image.Size.class);
            kryo.register(Media.class);
            kryo.register(Media.Player.class);
            return kryo;
        }
    };
    static byte[] kryoBytes;

    static {
        try {
            InputStream is = EishayParseBinary.class.getClassLoader().getResourceAsStream("data/eishay.json");
            String str = IOUtils.toString(is, "UTF-8");
            mc = JSONReader.of(str)
                    .read(MediaContent.class);

            fastjson2UTF8Bytes = JSON.toJSONBytes(mc);
            fastjson2JSONBBytes = JSONB.toBytes(mc);

            {
                ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
                Hessian2Output hessian2Output = new Hessian2Output(byteArrayOutputStream);
                hessian2Output.writeObject(mc);
                hessian2Output.flush();
                hessianBytes = byteArrayOutputStream.toByteArray();
            }
            {
                ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
                ObjectOutputStream objectOutputStream = new ObjectOutputStream(byteArrayOutputStream);
                objectOutputStream.writeObject(mc);
                objectOutputStream.flush();
                javaSerializeBytes = byteArrayOutputStream.toByteArray();
            }

            Kryo kryo = new Kryo();
            kryo.register(MediaContent.class);
            kryo.register(ArrayList.class);
            kryo.register(Image.class);
            kryo.register(Image.Size.class);
            kryo.register(Media.class);
            kryo.register(Media.Player.class);

            Output output = new Output(1024, -1);
            kryo.writeObject(output, mc);
            kryoBytes = output.toBytes();
        } catch (Throwable ex) {
            ex.printStackTrace();
        }
    }

    @Benchmark
    public void fastjson2UTF8Bytes(Blackhole bh) {
        bh.consume(
                JSON.parseObject(fastjson2UTF8Bytes, MediaContent.class)
        );
    }

    @Benchmark
    public void jsonb(Blackhole bh) {
        bh.consume(
                JSONB.parseObject(fastjson2JSONBBytes, MediaContent.class)
        );
    }

//    @Benchmark
    public void jsonbValid(Blackhole bh) {<FILL_FUNCTION_BODY>}

    @Benchmark
    public void javaSerialize(Blackhole bh) throws Exception {
        ByteArrayInputStream bytesIn = new ByteArrayInputStream(javaSerializeBytes);
        ObjectInputStream objectIn = new ObjectInputStream(bytesIn);
        bh.consume(objectIn.readObject());
    }

    @Benchmark
    public void hessian(Blackhole bh) throws Exception {
        ByteArrayInputStream bytesIn = new ByteArrayInputStream(hessianBytes);
        Hessian2Input hessian2Input = new Hessian2Input(bytesIn);
        bh.consume(hessian2Input.readObject());
    }

    public void kryo(Blackhole bh) throws Exception {
        Input input = new Input(kryoBytes);
        MediaContent object = kryos.get().readObject(input, MediaContent.class);
        bh.consume(object);
    }

    public static void main(String[] args) throws Exception {
        Options options = new OptionsBuilder()
                .include(EishayParseBinary.class.getName())
                .exclude(EishayParseBinaryAutoType.class.getName())
                .exclude(EishayParseBinaryArrayMapping.class.getName())
                .mode(Mode.Throughput)
                .timeUnit(TimeUnit.MILLISECONDS)
                .warmupIterations(3)
                .forks(1)
                .threads(16)
                .build();
        new Runner(options).run();
    }
}

        JSONReader jsonReader = JSONReader.ofJSONB(fastjson2JSONBBytes);
        jsonReader.skipValue();
        bh.consume(
                jsonReader.isEnd()
        );
        jsonReader.close();
    
<no_super_class>