Skip to content

Commit 43d4bec

Browse files
committed
✨ Update: Add guidelines for JSON serialization using json_loads and Pydantic methods
1 parent bc47bc7 commit 43d4bec

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/copilot-instructions.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ This document provides guidelines and best practices for using GitHub Copilot in
2323
- ensure we use `fastapi` >0.100 compatible code
2424
- use f-string formatting
2525

26+
27+
### Json serialization
28+
29+
- Use `json_loads` from `common_library.json_serialization` instead of `json.dumps` / `json.loads`.
30+
- Prefer Pydantic model methods (e.g., `model.model_dump_json()`) for serialization/deserialization.
31+
- Avoid using the built-in `json` module for these tasks.
32+
33+
2634
## Node.js-Specific Instructions
2735

2836
- Use ES6+ syntax and features.

0 commit comments

Comments
 (0)