Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 330 for marshal1 (0.17 sec)

  1. src/cmd/dist/testjson.go

    	var buf bytes.Buffer
    	var marshal1 func(v jsonValue) error
    	marshal1 = func(v jsonValue) error {
    		if t, ok := v.atom.(json.Delim); ok {
    			buf.WriteRune(rune(t))
    			for i, v2 := range v.seq {
    				if t == '{' && i%2 == 1 {
    					buf.WriteByte(':')
    				} else if i > 0 {
    					buf.WriteByte(',')
    				}
    				if err := marshal1(v2); err != nil {
    					return err
    				}
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 20:46:32 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/marshal.go

    	}
    	*s = nw
    	return nil
    }
    
    func (s JSONSchemaPropsOrStringArray) MarshalJSON() ([]byte, error) {
    	if len(s.Property) > 0 {
    		return json.Marshal(s.Property)
    	}
    	if s.Schema != nil {
    		return json.Marshal(s.Schema)
    	}
    	return []byte("null"), nil
    }
    
    func (s *JSONSchemaPropsOrStringArray) UnmarshalJSON(data []byte) error {
    	var first byte
    	if len(data) > 1 {
    		first = data[0]
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 13 21:12:46 UTC 2021
    - 2.9K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/marshal.go

    	}
    	*s = nw
    	return nil
    }
    
    func (s JSONSchemaPropsOrStringArray) MarshalJSON() ([]byte, error) {
    	if len(s.Property) > 0 {
    		return json.Marshal(s.Property)
    	}
    	if s.Schema != nil {
    		return json.Marshal(s.Schema)
    	}
    	return []byte("null"), nil
    }
    
    func (s *JSONSchemaPropsOrStringArray) UnmarshalJSON(data []byte) error {
    	var first byte
    	if len(data) > 1 {
    		first = data[0]
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 13 21:12:46 UTC 2021
    - 2.9K bytes
    - Viewed (0)
  4. cmd/kubeadm/app/util/marshal.go

    	"k8s.io/kubernetes/cmd/kubeadm/app/constants"
    )
    
    // MarshalToYaml marshals an object into yaml.
    func MarshalToYaml(obj runtime.Object, gv schema.GroupVersion) ([]byte, error) {
    	return MarshalToYamlForCodecs(obj, gv, clientsetscheme.Codecs)
    }
    
    // MarshalToYamlForCodecs marshals an object into yaml using the specified codec
    // TODO: Is specifying the gv really needed here?
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 29 05:14:21 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  5. pkg/util/protomarshal/protomarshal.go

    		DiscardUnknown: true,
    		Resolver:       anyResolver,
    	}).Unmarshal(b, m)
    }
    
    // ToJSON marshals a proto to canonical JSON
    func ToJSON(msg proto.Message) (string, error) {
    	return ToJSONWithIndent(msg, "")
    }
    
    // Marshal marshals a proto to canonical JSON
    func Marshal(msg proto.Message) ([]byte, error) {
    	res, err := ToJSONWithIndent(msg, "")
    	if err != nil {
    		return nil, err
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Mar 12 10:02:09 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/runtime/extension_test.go

    	for k, tc := range testCases {
    		new1 := test{}
    		new2 := test{}
    		data, err := json.Marshal(tc.orig)
    		if err != nil {
    			t.Errorf("1st marshal error: %v", err)
    		}
    		if err = json.Unmarshal(data, &new1); err != nil {
    			t.Errorf("1st unmarshal error: %v", err)
    		}
    		newData, err := json.Marshal(new1)
    		if err != nil {
    			t.Errorf("2st marshal error: %v", err)
    		}
    		if err = json.Unmarshal(newData, &new2); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 08 22:36:37 UTC 2017
    - 2.8K bytes
    - Viewed (0)
  7. src/crypto/hmac/hmac.go

    	if !outerOK {
    		return
    	}
    
    	imarshal, err := marshalableInner.MarshalBinary()
    	if err != nil {
    		return
    	}
    
    	h.outer.Reset()
    	h.outer.Write(h.opad)
    	omarshal, err := marshalableOuter.MarshalBinary()
    	if err != nil {
    		return
    	}
    
    	// Marshaling succeeded; save the marshaled state for later
    	h.ipad = imarshal
    	h.opad = omarshal
    	h.marshaled = true
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  8. pkg/apis/core/json.go

    // to prevent anyone from marshaling these internal structs.
    
    var _ = json.Marshaler(&AvoidPods{})
    var _ = json.Unmarshaler(&AvoidPods{})
    
    // MarshalJSON panics to prevent marshalling of internal structs
    func (AvoidPods) MarshalJSON() ([]byte, error) { panic("do not marshal internal struct") }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 25 18:06:51 UTC 2019
    - 1.2K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go

    		return err
    	}
    
    	pd, err := time.ParseDuration(str)
    	if err != nil {
    		return err
    	}
    	d.Duration = pd
    	return nil
    }
    
    // MarshalJSON implements the json.Marshaler interface.
    func (d Duration) MarshalJSON() ([]byte, error) {
    	return json.Marshal(d.Duration.String())
    }
    
    // ToUnstructured implements the value.UnstructuredConverter interface.
    func (d Duration) ToUnstructured() interface{} {
    	return d.Duration.String()
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Feb 08 00:11:06 UTC 2020
    - 1.9K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_proto.go

    	return nil
    }
    
    // Marshal implements the protobuf marshalling interface.
    func (m *MicroTime) Marshal() (data []byte, err error) {
    	if m == nil || m.Time.IsZero() {
    		return nil, nil
    	}
    	return m.ProtoMicroTime().Marshal()
    }
    
    // MarshalTo implements the protobuf marshalling interface.
    func (m *MicroTime) MarshalTo(data []byte) (int, error) {
    	if m == nil || m.Time.IsZero() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 02 08:21:04 UTC 2022
    - 2.3K bytes
    - Viewed (0)
Back to top