- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 447 for encodeArg (0.22 sec)
-
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) -
docs/en/docs/tutorial/encoder.md
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Oct 17 05:59:11 UTC 2023 - 1.8K bytes - Viewed (0) -
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) -
docs/pt/docs/tutorial/encoder.md
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 1.9K bytes - Viewed (0) -
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) -
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) -
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) -
src/encoding/gob/encoder_test.go
// See Issue 16204. func TestCatchInvalidNilValue(t *testing.T) { encodeErr, panicErr := encodeAndRecover(nil) if panicErr != nil { t.Fatalf("panicErr=%v, should not panic encoding untyped nil", panicErr) } if encodeErr == nil { t.Errorf("got err=nil, want non-nil error when encoding untyped nil value") } else if !strings.Contains(encodeErr.Error(), "nil value") {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 29.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/storage/storage_codec.go
} s := serializer.Serializer // Give callers the opportunity to wrap encoders and decoders. For decoders, each returned decoder will // be passed to the recognizer so that multiple decoders are available. var encoder runtime.Encoder = s if opts.EncoderDecoratorFn != nil { encoder = opts.EncoderDecoratorFn(encoder) } decoders := []runtime.Decoder{ // selected decoder as the primary s,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Nov 05 15:03:23 UTC 2022 - 3.8K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/interfaces.go
SupportedMediaTypes() []SerializerInfo // EncoderForVersion returns an encoder that ensures objects being written to the provided // serializer are in the provided group version. EncoderForVersion(serializer Encoder, gv GroupVersioner) Encoder // DecoderToVersion returns a decoder that ensures objects being read by the provided
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun May 28 03:26:35 UTC 2023 - 19K bytes - Viewed (0)