MCPcopy Create free account
hub / github.com/apache/fory / unwrapInterface

Function unwrapInterface

go/fory/map.go:640–647  ·  view source on GitHub ↗
(v reflect.Value)

Source from the content-addressed store, hash-verified

638}
639
640func unwrapInterface(v reflect.Value) reflect.Value {
641 // For map serialization, we need to unwrap interfaces including nil ones
642 // A nil interface should become an invalid (zero) Value for proper null detection
643 if v.Kind() == reflect.Interface {
644 return v.Elem()
645 }
646 return v
647}
648
649func wrapMapSerializerIfNeeded(declaredType, actualType reflect.Type, serializer Serializer) (reflect.Type, Serializer) {
650 if declaredType == nil || actualType == nil || serializer == nil {

Callers 4

WriteDataMethod · 0.85
writeChunkMethod · 0.85
readChunkMethod · 0.85
UnwrapReflectValueFunction · 0.85

Calls 1

KindMethod · 0.80

Tested by

no test coverage detected