diff --git a/core/src/main/java/com/alibaba/fastjson2/writer/ObjectWriterImplBoolValueArray.java b/core/src/main/java/com/alibaba/fastjson2/writer/ObjectWriterImplBoolValueArray.java index cb3cda1f1e..38da389332 100644 --- a/core/src/main/java/com/alibaba/fastjson2/writer/ObjectWriterImplBoolValueArray.java +++ b/core/src/main/java/com/alibaba/fastjson2/writer/ObjectWriterImplBoolValueArray.java @@ -14,7 +14,7 @@ class ObjectWriterImplBoolValueArray @Override public void writeJSONB(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) { - if (jsonWriter.isWriteTypeInfo(object)) { + if (jsonWriter.isWriteTypeInfo(object, fieldType, features)) { jsonWriter.writeTypeName(JSONB_TYPE_NAME_BYTES, JSONB_TYPE_HASH); } jsonWriter.writeBool((boolean[]) object); diff --git a/core/src/main/java/com/alibaba/fastjson2/writer/ObjectWriterImplCharValueArray.java b/core/src/main/java/com/alibaba/fastjson2/writer/ObjectWriterImplCharValueArray.java index e233fdde9c..d6f4849237 100644 --- a/core/src/main/java/com/alibaba/fastjson2/writer/ObjectWriterImplCharValueArray.java +++ b/core/src/main/java/com/alibaba/fastjson2/writer/ObjectWriterImplCharValueArray.java @@ -14,7 +14,7 @@ final class ObjectWriterImplCharValueArray @Override public void writeJSONB(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) { - if (jsonWriter.isWriteTypeInfo(object)) { + if (jsonWriter.isWriteTypeInfo(object, fieldType, features)) { jsonWriter.writeTypeName(JSONB_TYPE_NAME_BYTES, JSONB_TYPE_HASH); } jsonWriter.writeString((char[]) object);