Parcourir la source

fix #203 consider MarshalJSON as non empty

Tao Wen il y a 8 ans
Parent
commit
23078876c5
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      feature_reflect_native.go

+ 2 - 2
feature_reflect_native.go

@@ -700,7 +700,7 @@ func (encoder *marshalerEncoder) EncodeInterface(val interface{}, stream *Stream
 }
 
 func (encoder *marshalerEncoder) IsEmpty(ptr unsafe.Pointer) bool {
-	return encoder.checkIsEmpty.IsEmpty(ptr)
+	return false
 }
 
 type textMarshalerEncoder struct {
@@ -726,7 +726,7 @@ func (encoder *textMarshalerEncoder) EncodeInterface(val interface{}, stream *St
 }
 
 func (encoder *textMarshalerEncoder) IsEmpty(ptr unsafe.Pointer) bool {
-	return encoder.checkIsEmpty.IsEmpty(ptr)
+	return false
 }
 
 type unmarshalerDecoder struct {