Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 50 for marshalers (0.27 sec)

  1. src/encoding/json/encode_test.go

    		t.Errorf("Marshal:\n\tgot:  %s\n\twant: %s", got, want)
    	}
    }
    
    // Ref has Marshaler and Unmarshaler methods with pointer receiver.
    type Ref int
    
    func (*Ref) MarshalJSON() ([]byte, error) {
    	return []byte(`"ref"`), nil
    }
    
    func (r *Ref) UnmarshalJSON([]byte) error {
    	*r = 12
    	return nil
    }
    
    // Val has Marshaler methods with value receiver.
    type Val int
    
    func (Val) MarshalJSON() ([]byte, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 29.4K bytes
    - Viewed (0)
  2. src/encoding/json/encode.go

    	_ "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)
  3. istioctl/pkg/writer/envoy/configdump/endpoint.go

    	}
    	dump, err := c.retrieveSortedEndpointsSlice(filter)
    	if err != nil {
    		return err
    	}
    	marshaller := make(proto.MessageSlice, 0, len(dump))
    	for _, eds := range dump {
    		marshaller = append(marshaller, eds)
    	}
    	out, err := json.MarshalIndent(marshaller, "", "    ")
    	if err != nil {
    		return err
    	}
    	if outputFormat == "yaml" {
    		if out, err = yaml.JSONToYAML(out); err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 21 17:42:54 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  4. pkg/proxy/util/linebuffer.go

    	// returns the number of times Write() or WriteBytes() was called; it assumes that
    	// you never wrote any newlines to the buffer yourself.
    	Lines() int
    }
    
    var _ logr.Marshaler = &realLineBuffer{}
    
    type realLineBuffer struct {
    	b     bytes.Buffer
    	lines int
    }
    
    // NewLineBuffer returns a new "real" LineBuffer
    func NewLineBuffer() LineBuffer {
    	return &realLineBuffer{}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 22 05:08:41 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  5. operator/pkg/apis/istio/v1alpha1/value_types_json.go

    	err := json.Unmarshal(value, &s)
    	if err != nil {
    		return err
    	}
    	this.IntVal = &wrapperspb.Int32Value{Value: s}
    	return nil
    }
    
    func (this *IntOrString) MarshalJSONPB(_ *github_com_golang_protobuf_jsonpb.Marshaler) ([]byte, error) {
    	return this.MarshalJSON()
    }
    
    func (this *IntOrString) MarshalJSON() ([]byte, error) {
    	if this.IntVal != nil {
    		return json.Marshal(this.IntVal.GetValue())
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 21 17:42:54 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  6. src/crypto/tls/handshake_messages_test.go

    				if !ok {
    					t.Errorf("#%d: failed to create value", i)
    					break
    				}
    
    				m1 := v.Interface().(handshakeMessage)
    				marshaled := mustMarshal(t, m1)
    				if !m.unmarshal(marshaled) {
    					t.Errorf("#%d failed to unmarshal %#v %x", i, m1, marshaled)
    					break
    				}
    
    				if m, ok := m.(*SessionState); ok {
    					m.activeCertHandles = nil
    				}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  7. cmd/object-api-datatypes_gen.go

    package cmd
    
    // Code generated by github.com/tinylib/msgp DO NOT EDIT.
    
    import (
    	"github.com/minio/minio/internal/bucket/replication"
    	"github.com/tinylib/msgp/msgp"
    )
    
    // MarshalMsg implements msgp.Marshaler
    func (z BackendType) MarshalMsg(b []byte) (o []byte, err error) {
    	o = msgp.Require(b, z.Msgsize())
    	o = msgp.AppendInt(o, int(z))
    	return
    }
    
    // UnmarshalMsg implements msgp.Unmarshaler
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:31:51 UTC 2024
    - 70.1K bytes
    - Viewed (0)
  8. cmd/storage-datatypes_gen.go

    func (z BaseOptions) EncodeMsg(en *msgp.Writer) (err error) {
    	// map header, size 0
    	_ = z
    	err = en.Append(0x80)
    	if err != nil {
    		return
    	}
    	return
    }
    
    // MarshalMsg implements msgp.Marshaler
    func (z BaseOptions) MarshalMsg(b []byte) (o []byte, err error) {
    	o = msgp.Require(b, z.Msgsize())
    	// map header, size 0
    	_ = z
    	o = append(o, 0x80)
    	return
    }
    
    // UnmarshalMsg implements msgp.Unmarshaler
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 130.6K bytes
    - Viewed (0)
  9. 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)
  10. pkg/model/proxy.go

    	if err != nil {
    		return err
    	}
    	*s = StringBool(b)
    	return nil
    }
    
    // ProxyConfig can only be marshaled using (gogo) jsonpb. However, the rest of node meta is not a proto
    // To allow marshaling, we need to define a custom type that calls out to the gogo marshaller
    type NodeMetaProxyConfig meshconfig.ProxyConfig
    
    func (s *NodeMetaProxyConfig) MarshalJSON() ([]byte, error) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 17:18:17 UTC 2024
    - 18.7K bytes
    - Viewed (0)
Back to top