Fix typo in Section 19: SQL-first, Pydantic-second
This commit is contained in:
Collins
2024-05-02 07:54:38 +01:00
committed by GitHub
parent ae98be9cb4
commit f477655e5f

View File

@@ -837,7 +837,7 @@ async def get_creator_posts(creator: Mapping = Depends(valid_creator_id)):
return posts return posts
``` ```
If an aggregated data form DB is a simple JSON, then take a look at Pydantic's `Json` field type, If aggregated data from the DB is a simple JSON, then take a look at Pydantic's `Json` field type,
which will load raw JSON first. which will load raw JSON first.
```python ```python
from pydantic import BaseModel, Json from pydantic import BaseModel, Json