Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 70 for marshalers (0.17 sec)

  1. src/html/template/js.go

    	// "<!--", "-->", "<![CDATA[", "]]>", or "</script"
    	// in case custom marshalers produce output containing those.
    	// Note: Do not use \x escaping to save bytes because it is not JSON compatible and this escaper
    	// supports ld+json content-type.
    	if len(b) == 0 {
    		// In, `x=y/{{.}}*z` a json.Marshaler that produces "" should
    		// not cause the output `x=y/*z`.
    		return " null "
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  2. src/encoding/xml/marshal.go

    		start.Name.Local = typ.Name()
    	} else {
    		// Must be a pointer to a named type,
    		// since it has the Marshaler methods.
    		start.Name.Local = typ.Elem().Name()
    	}
    	return start
    }
    
    // marshalInterface marshals a Marshaler interface value.
    func (p *printer) marshalInterface(val Marshaler, start StartElement) error {
    	// Push a marker onto the tag stack so that MarshalXML
    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/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)
  4. 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)
  5. src/vendor/golang.org/x/crypto/cryptobyte/builder.go

    // they write into a given buffer and produce an error if it's exhausted.
    //
    // The zero value is a usable Builder that allocates space as needed.
    //
    // Simple values are marshaled and appended to a Builder using methods on the
    // Builder. Length-prefixed values are marshaled by providing a
    // BuilderContinuation, which is a function that writes the inner contents of
    // the value to a given Builder. See the documentation for BuilderContinuation
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 10 16:32:44 UTC 2023
    - 9.9K bytes
    - Viewed (0)
  6. internal/grid/msg_gen.go

    func (z Flags) EncodeMsg(en *msgp.Writer) (err error) {
    	err = en.WriteUint8(uint8(z))
    	if err != nil {
    		err = msgp.WrapError(err)
    		return
    	}
    	return
    }
    
    // MarshalMsg implements msgp.Marshaler
    func (z Flags) MarshalMsg(b []byte) (o []byte, err error) {
    	o = msgp.Require(b, z.Msgsize())
    	o = msgp.AppendUint8(o, uint8(z))
    	return
    }
    
    // UnmarshalMsg implements msgp.Unmarshaler
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Nov 21 01:09:35 UTC 2023
    - 18.8K bytes
    - Viewed (0)
  7. cmd/metrics-v2_gen.go

    package cmd
    
    // Code generated by github.com/tinylib/msgp DO NOT EDIT.
    
    import (
    	"github.com/tinylib/msgp/msgp"
    )
    
    // MarshalMsg implements msgp.Marshaler
    func (z *MetricDescription) MarshalMsg(b []byte) (o []byte, err error) {
    	o = msgp.Require(b, z.Msgsize())
    	// map header, size 5
    	// string "Namespace"
    	o = append(o, 0x85, 0xa9, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65)
    	o = msgp.AppendString(o, string(z.Namespace))
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sun Mar 10 09:15:15 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  8. cmd/erasure-server-pool-rebalance_gen.go

    func (z rebalSaveOpts) EncodeMsg(en *msgp.Writer) (err error) {
    	err = en.WriteUint8(uint8(z))
    	if err != nil {
    		err = msgp.WrapError(err)
    		return
    	}
    	return
    }
    
    // MarshalMsg implements msgp.Marshaler
    func (z rebalSaveOpts) MarshalMsg(b []byte) (o []byte, err error) {
    	o = msgp.Require(b, z.Msgsize())
    	o = msgp.AppendUint8(o, uint8(z))
    	return
    }
    
    // UnmarshalMsg implements msgp.Unmarshaler
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Mar 21 17:21:35 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  9. cmd/batch-job-common-types_gen.go

    	if err != nil {
    		return
    	}
    	err = en.WriteString(z.Value)
    	if err != nil {
    		err = msgp.WrapError(err, "Value")
    		return
    	}
    	return
    }
    
    // MarshalMsg implements msgp.Marshaler
    func (z BatchJobKV) MarshalMsg(b []byte) (o []byte, err error) {
    	o = msgp.Require(b, z.Msgsize())
    	// map header, size 2
    	// string "Key"
    	o = append(o, 0x82, 0xa3, 0x4b, 0x65, 0x79)
    	o = msgp.AppendString(o, z.Key)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sat Dec 02 10:51:33 UTC 2023
    - 21.9K bytes
    - Viewed (0)
  10. 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)
Back to top