@Test
    void test() {
        //writeObject
        CommonException error = new CommonException(1, "error");
        byte[] bytes = JSONB.toBytes(
                error,
                JSONWriter.Feature.WriteClassName,
                JSONWriter.Feature.FieldBased,
                JSONWriter.Feature.ErrorOnNoneSerializable,
                JSONWriter.Feature.ReferenceDetection,
                JSONWriter.Feature.WriteNulls,
                JSONWriter.Feature.NotWriteDefaultValue,
                JSONWriter.Feature.NotWriteHashMapArrayListClassName,
                JSONWriter.Feature.WriteNameAsSymbol);
        // readObject
        Object result = JSONB.parseObject(
                bytes,
                Exception.class,
                JSONReader.autoTypeFilter(true, CommonException.class),
                JSONReader.Feature.UseDefaultConstructorAsPossible,
                JSONReader.Feature.ErrorOnNoneSerializable,
                JSONReader.Feature.IgnoreAutoTypeNotMatch,
                JSONReader.Feature.UseNativeObject,
                JSONReader.Feature.FieldBased);
        assertNotNull(result);
        assertSame(result.getClass(), CommonException.class);
    }
@see FastJson2ObjectOutput#writeObject(Object)
@see FastJson2ObjectInput#readObject(Class)
core/src/test/java/com/alibaba/fastjson2/issues_2100/Issue2181.java