Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 118 for marshalers (0.62 sec)

  1. src/encoding/json/stream.go

    // of the output, SetEscapeHTML(false) disables this behavior.
    func (enc *Encoder) SetEscapeHTML(on bool) {
    	enc.escapeHTML = on
    }
    
    // RawMessage is a raw encoded JSON value.
    // It implements [Marshaler] and [Unmarshaler] and can
    // be used to delay JSON decoding or precompute a JSON encoding.
    type RawMessage []byte
    
    // MarshalJSON returns m as the JSON encoding of m.
    func (m RawMessage) MarshalJSON() ([]byte, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 12.9K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go

    		return nil
    	}
    
    	pt, err := time.Parse(RFC3339Micro, str)
    	if err != nil {
    		return err
    	}
    
    	t.Time = pt.Local()
    	return nil
    }
    
    // MarshalJSON implements the json.Marshaler interface.
    func (t MicroTime) MarshalJSON() ([]byte, error) {
    	if t.IsZero() {
    		// Encode unset/nil objects as JSON's "null".
    		return []byte("null"), nil
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  3. src/log/slog/level.go

    	case l < LevelWarn:
    		return str("INFO", l-LevelInfo)
    	case l < LevelError:
    		return str("WARN", l-LevelWarn)
    	default:
    		return str("ERROR", l-LevelError)
    	}
    }
    
    // MarshalJSON implements [encoding/json.Marshaler]
    // by quoting the output of [Level.String].
    func (l Level) MarshalJSON() ([]byte, error) {
    	// AppendQuote is sufficient for JSON-encoding all Level strings.
    	// They don't contain any runes that would produce invalid JSON
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 30 17:34:43 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  4. pkg/kube/apimirror/probe.go

    	if value[0] == '"' {
    		intstr.Type = String
    		return json.Unmarshal(value, &intstr.StrVal)
    	}
    	intstr.Type = Int
    	return json.Unmarshal(value, &intstr.IntVal)
    }
    
    // MarshalJSON implements the json.Marshaller interface.
    func (intstr IntOrString) MarshalJSON() ([]byte, error) {
    	switch intstr.Type {
    	case Int:
    		return json.Marshal(intstr.IntVal)
    	case String:
    		return json.Marshal(intstr.StrVal)
    	default:
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  5. cmd/bootstrap-peer-server_gen.go

    			return
    		}
    		err = en.WriteString(za0003)
    		if err != nil {
    			err = msgp.WrapError(err, "MinioEnv", za0002)
    			return
    		}
    	}
    	return
    }
    
    // MarshalMsg implements msgp.Marshaler
    func (z *ServerSystemConfig) MarshalMsg(b []byte) (o []byte, err error) {
    	o = msgp.Require(b, z.Msgsize())
    	// map header, size 3
    	// string "NEndpoints"
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Jan 24 21:36:44 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time.go

    		return nil
    	}
    
    	pt, err := time.Parse(time.RFC3339, str)
    	if err != nil {
    		return err
    	}
    
    	t.Time = pt.Local()
    	return nil
    }
    
    // MarshalJSON implements the json.Marshaler interface.
    func (t Time) MarshalJSON() ([]byte, error) {
    	if t.IsZero() {
    		// Encode unset/nil objects as JSON's "null".
    		return []byte("null"), nil
    	}
    	buf := make([]byte, 0, len(time.RFC3339)+2)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  7. cmd/metacache-walk_gen.go

    	if err != nil {
    		return
    	}
    	err = en.WriteString(z.DiskID)
    	if err != nil {
    		err = msgp.WrapError(err, "DiskID")
    		return
    	}
    	return
    }
    
    // MarshalMsg implements msgp.Marshaler
    func (z *WalkDirOptions) MarshalMsg(b []byte) (o []byte, err error) {
    	o = msgp.Require(b, z.Msgsize())
    	// map header, size 8
    	// string "Bucket"
    	o = append(o, 0x88, 0xa6, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Nov 21 01:09:35 UTC 2023
    - 7K bytes
    - Viewed (0)
  8. pilot/pkg/config/kube/crdclient/client.go

    // Istio store interface, we need to take dynamic inputs. Using the dynamic informers results in poor
    // performance, as the cache will store unstructured objects which need to be marshaled on each Get/List call.
    // Using istio/client-go directly will cache objects marshaled, allowing us to have cheap Get/List calls,
    // at the expense of some code gen.
    package crdclient
    
    import (
    	"fmt"
    	"sync"
    	"time"
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 14 00:12:28 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  9. cmd/batch-handlers_gen.go

    			return
    		}
    	} else {
    		err = z.Expire.EncodeMsg(en)
    		if err != nil {
    			err = msgp.WrapError(err, "Expire")
    			return
    		}
    	}
    	return
    }
    
    // MarshalMsg implements msgp.Marshaler
    func (z *BatchJobRequest) MarshalMsg(b []byte) (o []byte, err error) {
    	o = msgp.Require(b, z.Msgsize())
    	// map header, size 6
    	// string "ID"
    	o = append(o, 0x86, 0xa2, 0x49, 0x44)
    	o = msgp.AppendString(o, z.ID)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon May 06 20:27:52 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  10. pkg/apis/core/v1/defaults_test.go

    				}
    			} else {
    				if visit.path != "" {
    					marshaled, _ := json.Marshal(defaultedV.Interface())
    					defaults[visit.path] = string(marshaled)
    				}
    				toVisit = append(toVisit, testPath{path: visit.path, value: visit.value.Elem()})
    			}
    
    		case isPrimitive(visit.value.Kind()):
    			if !reflect.DeepEqual(defaultedV.Interface(), zeroV.Interface()) {
    				marshaled, _ := json.Marshal(defaultedV.Interface())
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 84.4K bytes
    - Viewed (0)
Back to top