🌱 Junior Track 28 of 29
28. JSON & Data Processing
Serialize and deserialize structured data using Python's standard `json` module. Master `json.dumps()`, `json.loads()`, file I/O with `json.dump()`/`json.load()`, API payload parsing, and custom encoders.
👁️ Views: 0
🎓 Junior Python Curriculum — Select Module
1️⃣ Fundamentals
2️⃣ Data Types
3️⃣ Operators
4️⃣ Conditionals
5️⃣ Loops
6️⃣ Collections
7️⃣ Comprehensions
8️⃣ Functions
9️⃣ *args & **kwargs
🔟 Scope & Namespaces
1️⃣1️⃣ OOP
1️⃣2️⃣ Exceptions
1️⃣3️⃣ File Handling
1️⃣4️⃣ Modules & Packages
1️⃣5️⃣ Virtual Environments
1️⃣6️⃣ Standard Library
1️⃣7️⃣ Iterators & Iterables
1️⃣8️⃣ Generators
1️⃣9️⃣ Decorators
2️⃣0️⃣ Context Managers
2️⃣1️⃣ Lambda Functions
2️⃣2️⃣ Functional Programming
2️⃣3️⃣ Type Hints
2️⃣4️⃣ Dataclasses
2️⃣5️⃣ Testing
2️⃣6️⃣ Debugging
2️⃣7️⃣ Logging
2️⃣8️⃣ JSON & Data
2️⃣9️⃣ Regular Expressions
3️⃣0️⃣ Databases
3️⃣1️⃣ APIs & HTTP
🌱 Junior Track 28 Master Reference
28. Python ↔ JSON Type Conversion & API Reference
🛠️ Python Standard `json` API Functions
| Function | Operation | Input Type | Output Type |
|---|---|---|---|
| json.dumps(obj) | Serialize | Python Object (`dict`, `list`) | JSON `str` |
| json.loads(str) | Deserialize | JSON `str` / `bytes` | Python Object (`dict`, `list`) |
| json.dump(obj, fp) | File Write | Python Object + File Pointer | Written `.json` Disk File |
| json.load(fp) | File Read | File Pointer (`.json` file) | Python Object (`dict`, `list`) |
🔄 Python ↔ JSON Type Mapping Matrix
| Python Data Type | JSON Data Equivalent | Example |
|---|---|---|
| dict | object | `{"key": "value"}` |
| list, tuple | array | [1, 2, "three"] |
| str | string | "hello world" |
| int, float | number | 42, 3.14159 |
| True / False | true / false | true, false |
| None | null | null |