Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for MarshalerError (0.25 sec)

  1. src/encoding/json/encode.go

    	return "json: invalid UTF-8 in string: " + strconv.Quote(e.S)
    }
    
    // A MarshalerError represents an error from calling a
    // [Marshaler.MarshalJSON] or [encoding.TextMarshaler.MarshalText] method.
    type MarshalerError struct {
    	Type       reflect.Type
    	Err        error
    	sourceFunc string
    }
    
    func (e *MarshalerError) Error() string {
    	srcFunc := e.sourceFunc
    	if srcFunc == "" {
    		srcFunc = "MarshalJSON"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 36.2K bytes
    - Viewed (0)
  2. src/encoding/json/encode_test.go

    	const errText = "json: test error"
    
    	tests := []struct {
    		CaseName
    		err  *MarshalerError
    		want string
    	}{{
    		Name(""),
    		&MarshalerError{st, fmt.Errorf(errText), ""},
    		"json: error calling MarshalJSON for type " + st.String() + ": " + errText,
    	}, {
    		Name(""),
    		&MarshalerError{st, fmt.Errorf(errText), "TestMarshalerError"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 29.4K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"InvalidUnmarshalError", Type, 0},
    		{"InvalidUnmarshalError.Type", Field, 0},
    		{"Marshal", Func, 0},
    		{"MarshalIndent", Func, 0},
    		{"Marshaler", Type, 0},
    		{"MarshalerError", Type, 0},
    		{"MarshalerError.Err", Field, 0},
    		{"MarshalerError.Type", Field, 0},
    		{"NewDecoder", Func, 0},
    		{"NewEncoder", Func, 0},
    		{"Number", Type, 1},
    		{"RawMessage", Type, 0},
    		{"SyntaxError", Type, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top