Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for UnmarshalJSON (0.52 sec)

  1. 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)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Sep 14 21:50:16 GMT 2023
    - 5.2K bytes
    - Viewed (1)
  2. 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)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Sep 14 21:50:16 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  3. 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
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Sun Apr 21 17:42:54 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  4. 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
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 08 17:45:03 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  5. internal/jwt/parser.go

    type StandardClaims struct {
    	AccessKey string `json:"accessKey,omitempty"`
    	jwtgo.StandardClaims
    }
    
    // UnmarshalJSON provides custom JSON unmarshal.
    // This is mainly implemented for speed.
    func (c *StandardClaims) UnmarshalJSON(b []byte) (err error) {
    	return jsonparser.ObjectEach(b, func(key []byte, value []byte, dataType jsonparser.ValueType, _ int) error {
    		if len(key) == 0 {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue May 09 07:53:08 GMT 2023
    - 13.9K bytes
    - Viewed (0)
  6. cmd/xl-storage-format-v1.go

    		Name:      fmt.Sprintf("part.%d", c.PartNumber),
    		Algorithm: c.Algorithm.String(),
    		Hash:      hex.EncodeToString(c.Hash),
    	}
    	return json.Marshal(info)
    }
    
    // UnmarshalJSON - custom checksum info unmarshaller
    func (c *ChecksumInfo) UnmarshalJSON(data []byte) error {
    	var info checksumInfoJSON
    	json := jsoniter.ConfigCompatibleWithStandardLibrary
    	if err := json.Unmarshal(data, &info); err != nil {
    		return err
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  7. istioctl/pkg/authz/authz.go

    			log.Errorf("failed to close %s: %s", filename, err)
    		}
    	}()
    	data, err := io.ReadAll(file)
    	if err != nil {
    		return nil, err
    	}
    
    	envoyConfig := &configdump.Wrapper{}
    	if err := envoyConfig.UnmarshalJSON(data); err != nil {
    		return nil, fmt.Errorf("failed to unmarshal proxy config: %s", err)
    	}
    	return envoyConfig, nil
    }
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Sat Apr 13 05:23:38 GMT 2024
    - 5K bytes
    - Viewed (0)
  8. internal/config/api/api.go

    	SyncEvents                  bool          `json:"sync_events"`
    	ObjectMaxVersions           int64         `json:"object_max_versions"`
    }
    
    // UnmarshalJSON - Validate SS and RRS parity when unmarshalling JSON.
    func (sCfg *Config) UnmarshalJSON(data []byte) error {
    	type Alias Config
    	aux := &struct {
    		*Alias
    	}{
    		Alias: (*Alias)(sCfg),
    	}
    	return json.Unmarshal(data, &aux)
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Mar 28 01:08:07 GMT 2024
    - 11.1K bytes
    - Viewed (1)
  9. internal/config/storageclass/storage-class.go

    	RRS         StorageClass `json:"rrs"`
    	Optimize    string       `json:"optimize"`
    	inlineBlock int64
    
    	initialized bool
    }
    
    // UnmarshalJSON - Validate SS and RRS parity when unmarshalling JSON.
    func (sCfg *Config) UnmarshalJSON(data []byte) error {
    	type Alias Config
    	aux := &struct {
    		*Alias
    	}{
    		Alias: (*Alias)(sCfg),
    	}
    	return json.Unmarshal(data, &aux)
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  10. istioctl/pkg/writer/envoy/configdump/configdump.go

    	includeConfigType = p
    }
    
    // Prime loads the config dump into the writer ready for printing
    func (c *ConfigWriter) Prime(b []byte) error {
    	w := &configdump.Wrapper{}
    	err := w.UnmarshalJSON(b)
    	if err != nil {
    		return fmt.Errorf("error unmarshalling config dump response from Envoy: %v", err)
    	}
    	c.configDump = w
    	return nil
    }
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Feb 29 20:46:41 GMT 2024
    - 7.4K bytes
    - Viewed (0)
Back to top