MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / implementsJSON

Function implementsJSON

tsunami/util/util.go:130–139  ·  view source on GitHub ↗
(t reflect.Type)

Source from the content-addressed store, hash-verified

128)
129
130func implementsJSON(t reflect.Type) bool {
131 if t.Implements(jsonMarshalerT) || t.Implements(textMarshalerT) {
132 return true
133 }
134 if t.Kind() != reflect.Pointer {
135 pt := reflect.PointerTo(t)
136 return pt.Implements(jsonMarshalerT) || pt.Implements(textMarshalerT)
137 }
138 return false
139}
140
141func ValidateAtomType(t reflect.Type, atomName string) error {
142 seen := make(map[reflect.Type]bool)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected