JSON ย่อมาจาก Javascript Object Notation เป็นรูปแบบแลกเปลี่ยนข้อมูล (data interchange format) ที่เบาและไม่ขึ้นอยู่กับภาษา ไลบรารี Python มีโมดูล json ที่ให้ฟังก์ชันสำหรับ JSON encoding และ decoding
ฟังก์ชัน dumps() แปลงออบเจ็กต์ Python เป็นรูปแบบ JSON
>> T1 = (12, "Ravi", "B.Com FY", 78.50)
>>> import json
>>> str1 = json.dumps(T1)
>>> str1
'[12, "Ravi", "B.Com FY", 78.5]'