Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 395 for encodeArg (0.17 sec)

  1. src/cmd/go/internal/work/exec.go

    	isBuilder := os.Getenv("GO_BUILDER_NAME") != ""
    	if isBuilder && rand.Intn(10) == 0 {
    		return true
    	}
    
    	return false
    }
    
    // encodeArg encodes an argument for response file writing.
    func encodeArg(arg string) string {
    	// If there aren't any characters we need to reencode, fastpath out.
    	if !strings.ContainsAny(arg, "\\\n") {
    		return arg
    	}
    	var b strings.Builder
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 14:46:37 UTC 2024
    - 105.6K bytes
    - Viewed (0)
  2. fastapi/encoders.py

        if isinstance(obj, BaseModel):
            # TODO: remove when deprecating Pydantic v1
            encoders: Dict[Any, Any] = {}
            if not PYDANTIC_V2:
                encoders = getattr(obj.__config__, "json_encoders", {})  # type: ignore[attr-defined]
                if custom_encoder:
                    encoders.update(custom_encoder)
            obj_dict = _model_dump(
                obj,
                mode="json",
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 21:56:59 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  3. docs/de/docs/reference/encoders.md

    # Encoder – `jsonable_encoder`
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Mon Feb 19 15:54:52 UTC 2024
    - 72 bytes
    - Viewed (0)
  4. src/encoding/gob/encoder.go

    // NewEncoder returns a new encoder that will transmit on the [io.Writer].
    func NewEncoder(w io.Writer) *Encoder {
    	enc := new(Encoder)
    	enc.w = []io.Writer{w}
    	enc.sent = make(map[reflect.Type]typeId)
    	enc.countState = enc.newEncoderState(new(encBuffer))
    	return enc
    }
    
    // writer returns the innermost writer the encoder is using.
    func (enc *Encoder) writer() io.Writer {
    	return enc.w[len(enc.w)-1]
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  5. docs/uk/docs/tutorial/encoder.md

    === "Python 3.10+"
    
        ```Python hl_lines="4  21"
        {!> ../../../docs_src/encoder/tutorial001_py310.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="5  22"
        {!> ../../../docs_src/encoder/tutorial001.py!}
        ```
    
    У цьому прикладі вона конвертує Pydantic model у `dict`, а `datetime` у `str`.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  6. docs/en/docs/reference/encoders.md

    # Encoders - `jsonable_encoder`
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Oct 18 12:36:40 UTC 2023
    - 71 bytes
    - Viewed (0)
  7. docs/de/docs/tutorial/encoder.md

    === "Python 3.10+"
    
        ```Python hl_lines="4  21"
        {!> ../../../docs_src/encoder/tutorial001_py310.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="5  22"
        {!> ../../../docs_src/encoder/tutorial001.py!}
        ```
    
    In diesem Beispiel wird das Pydantic-Modell in ein `dict`, und das `datetime`-Objekt in ein `str` konvertiert.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 30 18:07:21 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  8. docs/ru/docs/tutorial/encoder.md

    === "Python 3.10+"
    
        ```Python hl_lines="4  21"
        {!> ../../../docs_src/encoder/tutorial001_py310.py!}
        ```
    
    === "Python 3.6+"
    
        ```Python hl_lines="5  22"
        {!> ../../../docs_src/encoder/tutorial001.py!}
        ```
    
    В данном примере она преобразует Pydantic модель в `dict`, а `datetime` - в `str`.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Jan 23 13:56:12 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  9. platforms/core-runtime/serialization/src/main/java/org/gradle/internal/serialize/Encoder.java

    import java.io.OutputStream;
    
    /**
     * Provides a way to encode structured data to a backing byte stream. Implementations may buffer outgoing encoded bytes prior
     * to writing to the backing byte stream.
     */
    public interface Encoder {
        /**
         * Returns an {@link OutputStream} that can be used to write raw bytes to the stream.
         */
        OutputStream getOutputStream();
    
        /**
         * Writes a raw byte value to the stream.
         */
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Apr 15 16:06:56 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  10. docs/ja/docs/tutorial/encoder.md

    同様に、このデータベースはPydanticモデル(属性を持つオブジェクト)を受け取らず、`dict`だけを受け取ります。
    
    そのために`jsonable_encoder`を使用することができます。
    
    Pydanticモデルのようなオブジェクトを受け取り、JSON互換版を返します:
    
    ```Python hl_lines="5 22"
    {!../../../docs_src/encoder/tutorial001.py!}
    ```
    
    この例では、Pydanticモデルを`dict`に、`datetime`を`str`に変換します。
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Mon Jan 22 20:09:02 UTC 2024
    - 1.9K bytes
    - Viewed (0)
Back to top