Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 752 for marshal1 (0.27 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. src/encoding/xml/marshal.go

    const (
    	// Header is a generic XML header suitable for use with the output of [Marshal].
    	// This is not automatically added to any output of this package,
    	// it is provided as a convenience.
    	Header = `<?xml version="1.0" encoding="UTF-8"?>` + "\n"
    )
    
    // Marshal returns the XML encoding of v.
    //
    // Marshal handles an array or slice by marshaling each of the elements.
    // Marshal handles a pointer by marshaling the value it points at or, if the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 18:46:41 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  3. src/encoding/asn1/marshal.go

    	return t, nil
    }
    
    // Marshal returns the ASN.1 encoding of val.
    //
    // In addition to the struct tags recognized by Unmarshal, the following can be
    // used:
    //
    //	ia5:         causes strings to be marshaled as ASN.1, IA5String values
    //	omitempty:   causes empty slices to be skipped
    //	printable:   causes strings to be marshaled as ASN.1, PrintableString values
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. src/encoding/json/encode_test.go

    	s := renamedByteSlice("abc")
    	got, err := Marshal(s)
    	if err != nil {
    		t.Fatalf("Marshal error: %v", err)
    	}
    	want := `"YWJj"`
    	if string(got) != want {
    		t.Errorf("Marshal:\n\tgot:  %s\n\twant: %s", got, want)
    	}
    	r := renamedRenamedByteSlice("abc")
    	got, err = Marshal(r)
    	if err != nil {
    		t.Fatalf("Marshal error: %v", err)
    	}
    	if string(got) != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 29.4K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top