]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
📝 Update includes in `docs/en/docs/tutorial/encoder.md` (#12597)
authorTony Ly <15992943+tonyjly@users.noreply.github.com>
Sun, 27 Oct 2024 23:31:16 +0000 (16:31 -0700)
committerGitHub <noreply@github.com>
Sun, 27 Oct 2024 23:31:16 +0000 (23:31 +0000)
docs/en/docs/tutorial/encoder.md

index 039ac671499e74fda1e077b7df8214ff7b85d688..e2eceafcc10372710a1fba83f873bc1a89334fe0 100644 (file)
@@ -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`.