Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 630 for marshal1 (0.56 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. 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. 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)
  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. src/vendor/golang.org/x/crypto/cryptobyte/builder.go

    }
    
    // A MarshalingValue marshals itself into a Builder.
    type MarshalingValue interface {
    	// Marshal is called by Builder.AddValue. It receives a pointer to a builder
    	// to marshal itself into. It may return an error that occurred during
    	// marshaling, such as unset or invalid values.
    	Marshal(b *Builder) error
    }
    
    // AddValue calls Marshal on v, passing a pointer to the builder to append to.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 10 16:32:44 UTC 2023
    - 9.9K bytes
    - Viewed (0)
  9. 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)
  10. src/encoding/json/encode.go

    	"unicode/utf8"
    	_ "unsafe" // for linkname
    )
    
    // Marshal returns the JSON encoding of v.
    //
    // Marshal traverses the value v recursively.
    // If an encountered value implements [Marshaler]
    // and is not a nil pointer, Marshal calls [Marshaler.MarshalJSON]
    // to produce JSON. If no [Marshaler.MarshalJSON] method is present but the
    // value implements [encoding.TextMarshaler] instead, Marshal calls
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 36.2K bytes
    - Viewed (0)
Back to top