Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 536 for encodeArg (0.21 sec)

  1. 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)
  2. 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)
  3. docs/en/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 this example, it would convert the Pydantic model to a `dict`, and the `datetime` to a `str`.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 17 05:59:11 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  4. docs/em/docs/tutorial/encoder.md

    ⚫️ 📨 🎚, 💖 Pydantic 🏷, & 📨 🎻 🔗 ⏬:
    
    === "🐍 3️⃣.6️⃣ & 🔛"
    
        ```Python hl_lines="5  22"
        {!> ../../../docs_src/encoder/tutorial001.py!}
        ```
    
    === "🐍 3️⃣.1️⃣0️⃣ & 🔛"
    
        ```Python hl_lines="4  21"
        {!> ../../../docs_src/encoder/tutorial001_py310.py!}
        ```
    
    👉 🖼, ⚫️ 🔜 🗜 Pydantic 🏷 `dict`, & `datetime` `str`.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Apr 01 09:26:04 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  5. docs/pt/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!}
        ```
    
    Neste exemplo, ele converteria o modelo Pydantic em um `dict`, e o `datetime` em um `str`.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  6. docs/zh/docs/tutorial/encoder.md

    对此你可以使用`jsonable_encoder`。
    
    它接收一个对象,比如Pydantic模型,并会返回一个JSON兼容的版本:
    
    === "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模型转换为`dict`,并将`datetime`转换为`str`。
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 17 05:59:11 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  7. docs/ko/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: Wed Dec 08 15:43:31 UTC 2021
    - 1.9K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/storage/cacher/caching_object_test.go

    		}
    		if a, e := buffer.String(), encoder.expectedResult; e != a {
    			t.Errorf("%s: unexpected result: %s, expected: %s", encoder.identifier, a, e)
    		}
    	}
    	for _, encoder := range encoders {
    		if encoder.callsNumber != 1 {
    			t.Errorf("%s: unexpected number of encode() calls: %d", encoder.identifier, encoder.callsNumber)
    		}
    	}
    }
    
    func TestCachingObjectFieldAccessors(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 23 15:26:38 UTC 2022
    - 5.1K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go

    }
    
    func (d *decoder) Close() error {
    	return d.reader.Close()
    }
    
    type encoder struct {
    	writer  io.Writer
    	encoder runtime.Encoder
    	buf     *bytes.Buffer
    }
    
    // NewEncoder returns a new streaming encoder.
    func NewEncoder(w io.Writer, e runtime.Encoder) Encoder {
    	return &encoder{
    		writer:  w,
    		encoder: e,
    		buf:     &bytes.Buffer{},
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 25 14:51:36 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf_test.go

    	creater := &mockCreater{obj: &runtimetesting.MockCacheableObject{}}
    	typer := &mockTyper{gvk: &gvk}
    
    	encoders := []runtime.Encoder{
    		NewSerializer(creater, typer),
    		NewRawSerializer(creater, typer),
    	}
    
    	for _, encoder := range encoders {
    		runtimetesting.CacheableObjectTest(t, encoder)
    	}
    }
    
    type mockCreater struct {
    	apiVersion string
    	kind       string
    	err        error
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 27 03:17:50 UTC 2022
    - 5K bytes
    - Viewed (0)
Back to top