- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for marshalers (0.24 sec)
-
src/math/big/floatmarsh.go
const floatGobVersion byte = 1 // GobEncode implements the [encoding/gob.GobEncoder] interface. // The [Float] value and all its attributes (precision, // rounding mode, accuracy) are marshaled. func (x *Float) GobEncode() ([]byte, error) { if x == nil { return nil, nil } // determine max. space (bytes) required for encoding sz := 1 + 1 + 4 // version + mode|acc|form|neg (3+2+2+1bit) + prec
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 21:31:58 UTC 2024 - 3.6K bytes - Viewed (0) -
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) -
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) -
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) -
src/internal/chacha8rand/chacha8.go
var seed [4]uint64 for i := range seed { for { x, ok := s.Next() if ok { seed[i] = x break } s.Refill() } } s.Init64(seed) } // Marshal marshals the state into a byte slice. // Marshal and Unmarshal are functions, not methods, // so that they will not be linked into the runtime // when it uses the State struct, since the runtime // does not need these.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 21:47:29 UTC 2024 - 4.4K bytes - Viewed (0) -
pilot/pkg/xds/xdsgen.go
util.ByteCount(ResourceSize(res)), info, debug) } return nil } func ResourceSize(r model.Resources) int { // Approximate size by looking at the Any marshaled size. This avoids high cost // proto.Size, at the expense of slightly under counting. size := 0 for _, r := range r { size += len(r.Resource.Value) } return size
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon May 13 20:55:20 UTC 2024 - 6.3K bytes - Viewed (0) -
src/html/template/doc.go
in the escaped template <script>var pair = {{.}};</script> then the template output is <script>var pair = {"A": "foo", "B": "bar"};</script> See package json to understand how non-string content is marshaled for embedding in JavaScript contexts. # Typed Strings By default, this package assumes that all pipelines produce a plain text string. It adds escaping pipeline stages necessary to correctly and safely embed that
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 18:04:29 UTC 2024 - 7.9K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go
func (intstr *IntOrString) IntValue() int { if intstr.Type == String { i, _ := strconv.Atoi(intstr.StrVal) return i } return int(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: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:09 UTC 2024 - 7.8K bytes - Viewed (0)