- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 980 for u8marshal (0.24 sec)
-
src/encoding/json/decode_test.go
type ustructText struct { M unmarshalerText } // u8marshal is an integer type that can marshal/unmarshal itself. type u8marshal uint8 func (u8 u8marshal) MarshalText() ([]byte, error) { return []byte(fmt.Sprintf("u%d", u8)), nil } var errMissingU8Prefix = errors.New("missing 'u' prefix") func (u8 *u8marshal) UnmarshalText(b []byte) error { if !bytes.HasPrefix(b, []byte{'u'}) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 11 16:40:14 UTC 2024 - 67.6K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/marshal.go
var sch JSONSchemaProps if err := json.Unmarshal(data, &sch); err != nil { return err } nw.Schema = &sch } if first == '[' { if err := json.Unmarshal(data, &nw.Property); err != nil { return err } } *s = nw return nil } func (s JSONSchemaPropsOrArray) MarshalJSON() ([]byte, error) { if len(s.JSONSchemas) > 0 { return json.Marshal(s.JSONSchemas) } return json.Marshal(s.Schema)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Sep 13 21:12:46 UTC 2021 - 2.9K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/marshal.go
var sch JSONSchemaProps if err := json.Unmarshal(data, &sch); err != nil { return err } nw.Schema = &sch } if first == '[' { if err := json.Unmarshal(data, &nw.Property); err != nil { return err } } *s = nw return nil } func (s JSONSchemaPropsOrArray) MarshalJSON() ([]byte, error) { if len(s.JSONSchemas) > 0 { return json.Marshal(s.JSONSchemas) } return json.Marshal(s.Schema)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Sep 13 21:12:46 UTC 2021 - 2.9K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unmarshal/unmarshal.go
} // Classify the callee (without allocating memory). argidx := -1 recv := fn.Type().(*types.Signature).Recv() if fn.Name() == "Unmarshal" && recv == nil { // "encoding/json".Unmarshal // "encoding/xml".Unmarshal // "encoding/asn1".Unmarshal switch fn.Pkg().Path() { case "encoding/json", "encoding/xml", "encoding/asn1": argidx = 1 // func([]byte, interface{}) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 3.1K bytes - Viewed (0) -
src/cmd/vet/testdata/unmarshal/unmarshal.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Feb 20 15:46:42 UTC 2019 - 406 bytes - Viewed (0) -
pkg/util/protomarshal/protomarshal.go
strictUnmarshaler = jsonpb.Unmarshaler{} ) func Unmarshal(b []byte, m proto.Message) error { return strictUnmarshaler.Unmarshal(bytes.NewReader(b), legacyproto.MessageV1(m)) } func UnmarshalString(s string, m proto.Message) error { return Unmarshal([]byte(s), m) } func UnmarshalAllowUnknown(b []byte, m proto.Message) error { return unmarshaler.Unmarshal(bytes.NewReader(b), legacyproto.MessageV1(m)) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Mar 12 10:02:09 UTC 2024 - 6.6K bytes - Viewed (0) -
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) -
staging/src/k8s.io/apimachinery/pkg/runtime/extension_test.go
new1 := test{} new2 := test{} data, err := json.Marshal(tc.orig) if err != nil { t.Errorf("1st marshal error: %v", err) } if err = json.Unmarshal(data, &new1); err != nil { t.Errorf("1st unmarshal error: %v", err) } newData, err := json.Marshal(new1) if err != nil { t.Errorf("2st marshal error: %v", err) } if err = json.Unmarshal(newData, &new2); err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Aug 08 22:36:37 UTC 2017 - 2.8K bytes - Viewed (0) -
src/encoding/asn1/marshal.go
tag = *params.tag } t.tag = bytesEncoder(appendTagAndLength(t.scratch[:0], tagAndLength{class, tag, bodyLen, isCompound})) 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
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 17.1K bytes - Viewed (0) -
cmd/kubeadm/app/util/marshal.go
if !ok { return []byte{}, errors.Errorf("unsupported media type %q", mediaType) } encoder := codecs.EncoderForVersion(info.Serializer, gv) return runtime.Encode(encoder, obj) } // UniversalUnmarshal unmarshals YAML or JSON into a runtime.Object using the universal deserializer. func UniversalUnmarshal(buffer []byte) (runtime.Object, error) { codecs := clientsetscheme.Codecs decoder := codecs.UniversalDeserializer()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Feb 29 05:14:21 UTC 2024 - 5.8K bytes - Viewed (0)