- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 24 for UnmarshalJSON (0.13 sec)
-
istioctl/pkg/util/clusters/wrapper.go
} // MarshalJSON is a custom marshaller to handle protobuf pain func (w *Wrapper) MarshalJSON() ([]byte, error) { return protomarshal.Marshal(w) } // UnmarshalJSON is a custom unmarshaller to handle protobuf pain func (w *Wrapper) UnmarshalJSON(b []byte) error { cd := &admin.Clusters{} err := protomarshal.UnmarshalAllowUnknown(b, cd) *w = Wrapper{cd} return err
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Nov 03 08:41:32 UTC 2022 - 1.2K bytes - Viewed (0) -
istioctl/pkg/util/configdump/wrapper.go
// Wrapper is a wrapper around the Envoy ConfigDump // It has extra helper functions for handling any/struct/marshal protobuf pain type Wrapper struct { *admin.ConfigDump } // UnmarshalJSON is a custom unmarshaller to handle protobuf pain func (w *Wrapper) UnmarshalJSON(b []byte) error { cd := &admin.ConfigDump{} err := protomarshal.UnmarshalAllowUnknownWithAnyResolver(nonStrictResolver, b, cd) *w = Wrapper{cd} return err
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Sun Apr 21 17:42:54 UTC 2024 - 1.8K bytes - Viewed (0) -
internal/config/policy/opa/config.go
resp, err := client.Do(req) if err != nil { return err } defer a.CloseRespFn(resp.Body) return nil } // UnmarshalJSON - decodes JSON data. func (a *Args) UnmarshalJSON(data []byte) error { // subtype to avoid recursive call to UnmarshalJSON() type subArgs Args var so subArgs if err := json.Unmarshal(data, &so); err != nil { return err } oa := Args(so)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 10 20:16:44 UTC 2024 - 5.3K bytes - Viewed (0) -
internal/event/targetid.go
return ARN{TargetID: tid, region: region} } // MarshalJSON - encodes to JSON data. func (tid TargetID) MarshalJSON() ([]byte, error) { return json.Marshal(tid.String()) } // UnmarshalJSON - decodes JSON data. func (tid *TargetID) UnmarshalJSON(data []byte) error { var s string if err := json.Unmarshal(data, &s); err != nil { return err } targetID, err := parseTargetID(s) if err != nil { return err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jun 01 21:59:40 UTC 2021 - 1.8K bytes - Viewed (0) -
internal/config/lambda/event/targetid.go
return ARN{TargetID: tid, region: region} } // MarshalJSON - encodes to JSON data. func (tid TargetID) MarshalJSON() ([]byte, error) { return json.Marshal(tid.String()) } // UnmarshalJSON - decodes JSON data. func (tid *TargetID) UnmarshalJSON(data []byte) error { var s string if err := json.Unmarshal(data, &s); err != nil { return err } targetID, err := parseTargetID(s) if err != nil { return err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Mar 07 16:12:41 UTC 2023 - 1.8K bytes - Viewed (0) -
internal/kms/secret-key.go
Nonce []byte Bytes []byte } // UnmarshalJSON parses the given text as JSON-encoded // ciphertext. // // UnmarshalJSON provides backward-compatible unmarsahaling // of existing ciphertext. In the past, ciphertexts were // JSON-encoded. Now, ciphertexts are binary-encoded. // Therefore, there is no MarshalJSON implementation. func (c *ciphertext) UnmarshalJSON(text []byte) error { const ( IVSize = 16
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Aug 18 06:43:03 UTC 2024 - 8.3K bytes - Viewed (0) -
internal/config/bool-flag.go
} return "off" } // MarshalJSON - converts BoolFlag into JSON data. func (bf BoolFlag) MarshalJSON() ([]byte, error) { return json.Marshal(bf.String()) } // UnmarshalJSON - parses given data into BoolFlag. func (bf *BoolFlag) UnmarshalJSON(data []byte) (err error) { var s string if err = json.Unmarshal(data, &s); err == nil { b := BoolFlag(true) if s == "" { // Empty string is treated as valid. *bf = b
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Apr 07 15:10:40 UTC 2022 - 2.3K bytes - Viewed (0) -
internal/config/policy/plugin/config.go
resp, err := client.Do(req) if err != nil { return err } defer a.CloseRespFn(resp.Body) return nil } // UnmarshalJSON - decodes JSON data. func (a *Args) UnmarshalJSON(data []byte) error { // subtype to avoid recursive call to UnmarshalJSON() type subArgs Args var so subArgs if err := json.Unmarshal(data, &so); err != nil { return err } oa := Args(so)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 5.8K bytes - Viewed (0) -
internal/config/bool-flag_test.go
data, _ := testCase.flag.MarshalJSON() if testCase.expectedResult != string(data) { t.Fatalf("expected: %v, got: %v", testCase.expectedResult, string(data)) } } } // Test BoolFlag.UnmarshalJSON() func TestBoolFlagUnmarshalJSON(t *testing.T) { testCases := []struct { data []byte expectedResult BoolFlag expectedErr bool }{ {[]byte(`{}`), BoolFlag(false), true},
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jun 01 21:59:40 UTC 2021 - 3.5K bytes - Viewed (0) -
internal/event/name.go
*name = eventName return nil } // MarshalJSON - encodes to JSON data. func (name Name) MarshalJSON() ([]byte, error) { return json.Marshal(name.String()) } // UnmarshalJSON - decodes JSON data. func (name *Name) UnmarshalJSON(data []byte) error { var s string if err := json.Unmarshal(data, &s); err != nil { return err } eventName, err := ParseName(s) if err != nil { return err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 01 01:11:10 UTC 2024 - 10.4K bytes - Viewed (0)