Method
decodeJSONBoolean
(tv bool, rv reflect.Value)
Source from the content-addressed store, hash-verified
| 84 | } |
| 85 | |
| 86 | func (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 | |
| 97 | func (d *Decoder) decodeJSONNumber(tv json.Number, rv reflect.Value) error { |
| 98 | switch rv.Kind() { |
Tested by
no test coverage detected