MCPcopy Create free account
hub / github.com/aws/smithy-go / decodeJSONBoolean

Method decodeJSONBoolean

document/json/decoder.go:86–95  ·  view source on GitHub ↗
(tv bool, rv reflect.Value)

Source from the content-addressed store, hash-verified

84}
85
86func (d *Decoder) decodeJSONBoolean(tv bool, rv reflect.Value) error {
87 switch rv.Kind() {
88 case reflect.Bool, reflect.Interface:
89 rv.Set(reflect.ValueOf(tv).Convert(rv.Type()))
90 default:
91 return &document.UnmarshalTypeError{Value: "bool", Type: rv.Type()}
92 }
93
94 return nil
95}
96
97func (d *Decoder) decodeJSONNumber(tv json.Number, rv reflect.Value) error {
98 switch rv.Kind() {

Callers 1

decodeMethod · 0.95

Calls 2

TypeMethod · 0.80
SetMethod · 0.45

Tested by

no test coverage detected