Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 752 for marshal1 (0.14 sec)

  1. pkg/apis/core/json.go

    // to prevent anyone from marshaling these internal structs.
    
    var _ = json.Marshaler(&AvoidPods{})
    var _ = json.Unmarshaler(&AvoidPods{})
    
    // MarshalJSON panics to prevent marshalling of internal structs
    func (AvoidPods) MarshalJSON() ([]byte, error) { panic("do not marshal internal struct") }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 25 18:06:51 UTC 2019
    - 1.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go

    		return err
    	}
    
    	pd, err := time.ParseDuration(str)
    	if err != nil {
    		return err
    	}
    	d.Duration = pd
    	return nil
    }
    
    // MarshalJSON implements the json.Marshaler interface.
    func (d Duration) MarshalJSON() ([]byte, error) {
    	return json.Marshal(d.Duration.String())
    }
    
    // ToUnstructured implements the value.UnstructuredConverter interface.
    func (d Duration) ToUnstructured() interface{} {
    	return d.Duration.String()
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Feb 08 00:11:06 UTC 2020
    - 1.9K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  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/testing/cacheable_object.go

    )
    
    // nonCacheableTestObject implements json.Marshaler and proto.Marshaler interfaces
    // for mocking purpose.
    // +k8s:deepcopy-gen=false
    type noncacheableTestObject struct {
    	gvk schema.GroupVersionKind
    }
    
    // MarshalJSON implements json.Marshaler interface.
    func (*noncacheableTestObject) MarshalJSON() ([]byte, error) {
    	return []byte("\"json-result\""), nil
    }
    
    // Marshal implements proto.Marshaler interface.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 30 06:58:54 UTC 2019
    - 6.1K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_proto_test.go

    	}
    	for _, testCase := range table {
    		q := MustParse(testCase.quantity)
    		// Won't currently get an error as MarshalTo can't return one
    		result, _ := q.Marshal()
    		q.MarshalTo(result)
    		if q.Cmp(testCase.expect) != 0 {
    			t.Errorf("Expected: %v, Actual: %v", testCase.expect, q)
    		}
    	}
    	// Test when i is {0,0}
    	table2 := []struct {
    		dec    *inf.Dec
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 25 07:12:11 UTC 2017
    - 3.7K bytes
    - Viewed (0)
  8. 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)
  9. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time_proto.go

    	m.Time = time.Unix(p.Seconds, int64(0)).Local()
    	return nil
    }
    
    // Marshal implements the protobuf marshaling interface.
    func (m *Time) Marshal() (data []byte, err error) {
    	if m == nil || m.Time.IsZero() {
    		return nil, nil
    	}
    	return m.ProtoTime().Marshal()
    }
    
    // MarshalTo implements the protobuf marshaling interface.
    func (m *Time) MarshalTo(data []byte) (int, error) {
    	if m == nil || m.Time.IsZero() {
    		return 0, nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 25 18:54:00 UTC 2019
    - 3.3K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct/direct.go

    // types that implement cbor.Marshaler and cbor.Unmarshaler should use these functions.
    package direct
    
    import (
    	"k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes"
    )
    
    func Marshal(src interface{}) ([]byte, error) {
    	return modes.Encode.Marshal(src)
    }
    
    func Unmarshal(src []byte, dst interface{}) error {
    	return modes.Decode.Unmarshal(src, dst)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 15 15:31:10 UTC 2024
    - 1.2K bytes
    - Viewed (0)
Back to top