github.com/switchupcb/yaegi@v0.10.2/stdlib/go1_17_encoding_json.go (about) 1 // Code generated by 'yaegi extract encoding/json'. DO NOT EDIT. 2 3 //go:build go1.17 4 // +build go1.17 5 6 package stdlib 7 8 import ( 9 "encoding/json" 10 "reflect" 11 ) 12 13 func init() { 14 Symbols["encoding/json/json"] = map[string]reflect.Value{ 15 // function, constant and variable definitions 16 "Compact": reflect.ValueOf(json.Compact), 17 "HTMLEscape": reflect.ValueOf(json.HTMLEscape), 18 "Indent": reflect.ValueOf(json.Indent), 19 "Marshal": reflect.ValueOf(json.Marshal), 20 "MarshalIndent": reflect.ValueOf(json.MarshalIndent), 21 "NewDecoder": reflect.ValueOf(json.NewDecoder), 22 "NewEncoder": reflect.ValueOf(json.NewEncoder), 23 "Unmarshal": reflect.ValueOf(json.Unmarshal), 24 "Valid": reflect.ValueOf(json.Valid), 25 26 // type definitions 27 "Decoder": reflect.ValueOf((*json.Decoder)(nil)), 28 "Delim": reflect.ValueOf((*json.Delim)(nil)), 29 "Encoder": reflect.ValueOf((*json.Encoder)(nil)), 30 "InvalidUTF8Error": reflect.ValueOf((*json.InvalidUTF8Error)(nil)), 31 "InvalidUnmarshalError": reflect.ValueOf((*json.InvalidUnmarshalError)(nil)), 32 "Marshaler": reflect.ValueOf((*json.Marshaler)(nil)), 33 "MarshalerError": reflect.ValueOf((*json.MarshalerError)(nil)), 34 "Number": reflect.ValueOf((*json.Number)(nil)), 35 "RawMessage": reflect.ValueOf((*json.RawMessage)(nil)), 36 "SyntaxError": reflect.ValueOf((*json.SyntaxError)(nil)), 37 "Token": reflect.ValueOf((*json.Token)(nil)), 38 "UnmarshalFieldError": reflect.ValueOf((*json.UnmarshalFieldError)(nil)), 39 "UnmarshalTypeError": reflect.ValueOf((*json.UnmarshalTypeError)(nil)), 40 "Unmarshaler": reflect.ValueOf((*json.Unmarshaler)(nil)), 41 "UnsupportedTypeError": reflect.ValueOf((*json.UnsupportedTypeError)(nil)), 42 "UnsupportedValueError": reflect.ValueOf((*json.UnsupportedValueError)(nil)), 43 44 // interface wrapper definitions 45 "_Marshaler": reflect.ValueOf((*_encoding_json_Marshaler)(nil)), 46 "_Token": reflect.ValueOf((*_encoding_json_Token)(nil)), 47 "_Unmarshaler": reflect.ValueOf((*_encoding_json_Unmarshaler)(nil)), 48 } 49 } 50 51 // _encoding_json_Marshaler is an interface wrapper for Marshaler type 52 type _encoding_json_Marshaler struct { 53 IValue interface{} 54 WMarshalJSON func() ([]byte, error) 55 } 56 57 func (W _encoding_json_Marshaler) MarshalJSON() ([]byte, error) { 58 return W.WMarshalJSON() 59 } 60 61 // _encoding_json_Token is an interface wrapper for Token type 62 type _encoding_json_Token struct { 63 IValue interface{} 64 } 65 66 // _encoding_json_Unmarshaler is an interface wrapper for Unmarshaler type 67 type _encoding_json_Unmarshaler struct { 68 IValue interface{} 69 WUnmarshalJSON func(a0 []byte) error 70 } 71 72 func (W _encoding_json_Unmarshaler) UnmarshalJSON(a0 []byte) error { 73 return W.WUnmarshalJSON(a0) 74 }