Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 318 for serialize (0.23 sec)

  1. tests/test_jsonable_encoder.py

    
    @needs_pydanticv2
    def test_encode_custom_json_encoders_model_pydanticv2():
        from pydantic import field_serializer
    
        class ModelWithCustomEncoder(BaseModel):
            dt_field: datetime
    
            @field_serializer("dt_field")
            def serialize_dt_field(self, dt):
                return dt.replace(microsecond=0, tzinfo=timezone.utc).isoformat()
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 9K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/base/SuppliersTest.java

        assertEquals(Integer.valueOf(5), reserialize(Suppliers.ofInstance(5)).get());
        assertEquals(
            Integer.valueOf(5),
            reserialize(Suppliers.compose(Functions.identity(), Suppliers.ofInstance(5))).get());
        assertEquals(Integer.valueOf(5), reserialize(Suppliers.memoize(Suppliers.ofInstance(5))).get());
        assertEquals(
            Integer.valueOf(5),
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 18.1K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/base/SuppliersTest.java

        assertEquals(Integer.valueOf(5), reserialize(Suppliers.ofInstance(5)).get());
        assertEquals(
            Integer.valueOf(5),
            reserialize(Suppliers.compose(Functions.identity(), Suppliers.ofInstance(5))).get());
        assertEquals(Integer.valueOf(5), reserialize(Suppliers.memoize(Suppliers.ofInstance(5))).get());
        assertEquals(
            Integer.valueOf(5),
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 18.1K bytes
    - Viewed (0)
  4. istioctl/pkg/admin/istiodconfig.go

    	if err != nil {
    		return nil, fmt.Errorf("cannot deserialize response %s", err)
    	}
    	return scopeInfos, nil
    }
    
    func (c *ControlzClient) PutScope(scope *ScopeInfo) error {
    	var jsonScopeInfo bytes.Buffer
    	err := json.NewEncoder(&jsonScopeInfo).Encode(scope)
    	if err != nil {
    		return fmt.Errorf("cannot serialize scope %+v", *scope)
    	}
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Sat Apr 13 05:23:38 GMT 2024
    - 13.5K bytes
    - Viewed (0)
  5. cmd/admin-handlers-pools.go

    	if objectAPI == nil {
    		return
    	}
    
    	// NB rebalance-start admin API is always coordinated from first pool's
    	// first node. The following is required to serialize (the effects of)
    	// concurrent rebalance-start commands.
    	if ep := globalEndpoints[0].Endpoints[0]; !ep.IsLocal {
    		for nodeIdx, proxyEp := range globalProxyEndpoints {
    			if proxyEp.Endpoint.Host == ep.Host {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/ImmutableRangeMap.java

        }
        return false;
      }
    
      @Override
      public String toString() {
        return asMapOfRanges().toString();
      }
    
      /**
       * This class is used to serialize ImmutableRangeMap instances. Serializes the {@link
       * #asMapOfRanges()} form.
       */
      private static class SerializedForm<K extends Comparable<?>, V> implements Serializable {
    
        private final ImmutableMap<Range<K>, V> mapOfRanges;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 14.5K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/ImmutableRangeMap.java

        }
        return false;
      }
    
      @Override
      public String toString() {
        return asMapOfRanges().toString();
      }
    
      /**
       * This class is used to serialize ImmutableRangeMap instances. Serializes the {@link
       * #asMapOfRanges()} form.
       */
      private static class SerializedForm<K extends Comparable<?>, V> implements Serializable {
    
        private final ImmutableMap<Range<K>, V> mapOfRanges;
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 14.7K bytes
    - Viewed (0)
  8. cni/pkg/plugin/plugin.go

    	// Parse previous result. Remove this if your plugin is not chained.
    	if conf.RawPrevResult != nil {
    		resultBytes, err := json.Marshal(conf.RawPrevResult)
    		if err != nil {
    			return nil, fmt.Errorf("could not serialize prevResult: %v", err)
    		}
    		res, err := version.NewResult(conf.CNIVersion, resultBytes)
    		if err != nil {
    			return nil, fmt.Errorf("could not parse prevResult: %v", err)
    		}
    		conf.RawPrevResult = nil
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed May 08 15:58:51 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  9. fastapi/dependencies/utils.py

        is_scalar_field,
        is_scalar_sequence_field,
        is_sequence_field,
        is_uploadfile_or_nonable_uploadfile_annotation,
        is_uploadfile_sequence_annotation,
        lenient_issubclass,
        sequence_types,
        serialize_sequence_value,
        value_is_sequence,
    )
    from fastapi.background import BackgroundTasks
    from fastapi.concurrency import (
        asynccontextmanager,
        contextmanager_in_threadpool,
    )
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  10. fastapi/applications.py

                        show it as the response (JSON Schema).
                    * Serialization: you could return an arbitrary object and the
                        `response_model` would be used to serialize that object into the
                        corresponding JSON.
                    * Filtering: the JSON sent to the client will only contain the data
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
Back to top