From: Tony Ly <15992943+tonyjly@users.noreply.github.com> Date: Sun, 27 Oct 2024 23:31:16 +0000 (-0700) Subject: 📝 Update includes in `docs/en/docs/tutorial/encoder.md` (#12597) X-Git-Tag: 0.115.5~238 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=96a6d469e917076749b36603f509a8adc39a050c;p=thirdparty%2Ffastapi%2Ffastapi.git 📝 Update includes in `docs/en/docs/tutorial/encoder.md` (#12597) --- diff --git a/docs/en/docs/tutorial/encoder.md b/docs/en/docs/tutorial/encoder.md index 039ac67149..e2eceafcc1 100644 --- a/docs/en/docs/tutorial/encoder.md +++ b/docs/en/docs/tutorial/encoder.md @@ -20,21 +20,7 @@ You can use `jsonable_encoder` for that. It receives an object, like a Pydantic model, and returns a JSON compatible version: -//// tab | Python 3.10+ - -```Python hl_lines="4 21" -{!> ../../docs_src/encoder/tutorial001_py310.py!} -``` - -//// - -//// tab | Python 3.8+ - -```Python hl_lines="5 22" -{!> ../../docs_src/encoder/tutorial001.py!} -``` - -//// +{* ../../docs_src/encoder/tutorial001_py310.py hl[4,21] *} In this example, it would convert the Pydantic model to a `dict`, and the `datetime` to a `str`.