Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 315 for marshal1 (0.22 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go

    		encodedSize := uint64(t.Size())
    		data := memAlloc.Allocate(encodedSize)
    
    		n, err := t.MarshalTo(data)
    		if err != nil {
    			return err
    		}
    		_, err = w.Write(data[:n])
    		return err
    
    	case proto.Marshaler:
    		// this path performs extra allocations
    		data, err := t.Marshal()
    		if err != nil {
    			return err
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 23 13:38:23 UTC 2022
    - 17.8K bytes
    - Viewed (0)
  7. pkg/volume/csi/nodeinfomanager/nodeinfomanager_test.go

    	}
    
    	if len(capacity) > 0 {
    		node.Status.Capacity = v1.ResourceList(capacity)
    		node.Status.Allocatable = v1.ResourceList(capacity)
    	}
    	return node
    }
    
    func marshall(nodeIDs nodeIDMap) string {
    	b, _ := json.Marshal(nodeIDs)
    	return string(b)
    }
    
    func generateCSINode(nodeIDs nodeIDMap, volumeLimits *storage.VolumeNodeResources, topologyKeys topologyKeyMap) *storage.CSINode {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Dec 17 02:02:59 UTC 2022
    - 34.3K bytes
    - Viewed (0)
  8. src/html/template/js.go

    	"try":        true,
    	"typeof":     true,
    	"void":       true,
    }
    
    var jsonMarshalType = reflect.TypeFor[json.Marshaler]()
    
    // indirectToJSONMarshaler returns the value, after dereferencing as many times
    // as necessary to reach the base type (or nil) or an implementation of json.Marshal.
    func indirectToJSONMarshaler(a any) any {
    	// text/template now supports passing untyped nil as a func call
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  9. src/hash/crc64/crc64_test.go

    			if h.Sum64() != h2.Sum64() {
    				t.Errorf("ECMA crc64(%s) = 0x%x != marshaled (0x%x)", g.in, h.Sum64(), h2.Sum64())
    			}
    		}
    	})
    }
    
    func TestMarshalTableMismatch(t *testing.T) {
    	h1 := New(MakeTable(ISO))
    	h2 := New(MakeTable(ECMA))
    
    	state1, err := h1.(encoding.BinaryMarshaler).MarshalBinary()
    	if err != nil {
    		t.Errorf("could not marshal: %v", err)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 25 06:32:12 UTC 2018
    - 9.9K bytes
    - Viewed (0)
  10. src/vendor/golang.org/x/net/route/address.go

    		case *Inet4Addr:
    			l, err := a.marshal(b)
    			if err != nil {
    				return 0, err
    			}
    			b = b[l:]
    			attrs |= 1 << uint(i)
    		case *Inet6Addr:
    			l, err := a.marshal(b)
    			if err != nil {
    				return 0, err
    			}
    			b = b[l:]
    			attrs |= 1 << uint(i)
    		case *DefaultAddr:
    			l, err := a.marshal(b)
    			if err != nil {
    				return 0, err
    			}
    			b = b[l:]
    			attrs |= 1 << uint(i)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 9.9K bytes
    - Viewed (0)
Back to top