การถอดรหัสและเข้ารหัส JSON เบื้องต้นด้วยภาษา Python

แชร์ความรู้ภาษา Python ไพทอน การเขียนโปรแกรมภาษาไพทอน

Moderators: mindphp, ผู้ดูแลกระดาน

kritsadak
PHP Full Member
PHP Full Member
Posts: 30
Joined: 24/12/2018 10:18 am

การถอดรหัสและเข้ารหัส JSON เบื้องต้นด้วยภาษา Python

Postby kritsadak » 28/12/2018 2:42 pm

ในบทความนี้ จะเป็นการแนะนำการเข้ารหัสข้อมูล และการถอดรหัสรูปแบบของ Json หรือ Java Script Object Notation เพื่ออ่านค่าภายในข้อมูลนั้นๆ หรือเพื่อดึงค่าที่ต้องการนั้นออกมาด้วยภาษา Python

ตัวอย่าง ข้อมูลที่ยังไม่ถูกเข้ารหัสข้อมูลเป็น Json
{
"FirstName":"MindPHP",
"LastName":"com",
"NickName":"Knowledge หรือความรู้"
}


ขั้นแรก เริ่มต้นด้วยการเพิ่ม library json ให้กับ python

Code: Select all

import json


ในส่วนของการ Dumps (เข้ารหัสข้อมูล)

ตัวอย่าง Code ทั้งหมดของการ dumps ข้อมูลให้เป็น Json

Code: Select all

#! /usr/bin/python3
# -*- coding: utf-8 -*-
import json
detail = {
    "FirstName":"MindPHP",
    "LastName":"com",
    "NickName":"Knowledge หรือความรู้"
}
dumping = json.dumps(detail)
print(dumping)


d่umps เป็น function ที่ต้องการใช้ในภาษา Python ทีนี้เราก็จะเขียนคำสั่งนี้ลงไป

Code: Select all

json.dumps(ข้อมูลที่ต้องการเข้ารหัส)

** หมายเหตุ แล้วถ้ารหัสของข้อมูลมีภาษาไทยรวมอยู่ด้วย ผลลัพท์จะเป็น
Image


ดังนั้น วิธีแก้ไข หากว่าข้อมูลนั้นเป็น ภาษาไทย ก็ต้องเพิ่มเติมคำสั่งนี้ลงไปด้วยเสมอ เพื่อแปลงข้อมูล

Code: Select all

json.dumps(ข้อมูลที่ต้องการเข้ารหัส, ensure_ascii=False)

ผลลัพท์ก็จะได้
Image


ในส่วนของการ Loads (ถอดรหัสข้อมูล)

จากนั้น เมื่อเราได้ข้อมูลที่ถูกเข้ารหัสออกมาเป็น json แล้ว เราก็จะทำการถอดรหัสข้อมูล เพื่อดึงค่าภายในของข้อมูลนั้นออกมา และสามารถดึงข้อมูลออกมาแสดงได้โดยใช้คำสั่งนี้

Code: Select all

json.loads(ข้อมูลที่ต้องการถอดรหัส)

print(ชื่อObject['ข้อมูลที่ต้องการจะดึงข้อมูลออกมาแสดง'])


ตัวอย่าง Code ทั้งหมด dumps และ loads

Code: Select all

#! /usr/bin/python3
# -*- coding: utf-8 -*-
import json
detail = {
    "FirstName":"MindPHP",
    "LastName":"com",
    "NickName":"Knowledge หรือความรู้"
}
# -- dumps
dumping = json.dumps(detail)
#print(dumping)


# -- loads
loading = json.loads(json_detail)
print(loading['FirstName'])
print(loading['LastName'])
print(loading['NickName'])
print()
print('www.'+loading['FirstName']+'.'+loading['LastName']+' เป็นเว็ปไซต์ที่ให้ '+loading['NickName']+' ของโปรแกรมหลายภาษา รวมทั้งให้คำปรึกษาหรือสอบถามข้อมูลได้')


ผลลัพท์ที่ได้
Image

User avatar
Angkana Taprab
PHP Newbie
PHP Newbie
Posts: 1
Joined: 02/01/2019 10:31 pm

Re: การถอดรหัสและเข้ารหัส JSON เบื้องต้นด้วยภาษา Python

Postby Angkana Taprab » 02/01/2019 10:40 pm

{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544499901046,
"content": "\u00e0\u00b9\u0080\u00e0\u00b8\u0084\u00e0\u00b8\u00a3",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544499825122,
"content": "\u00e0\u00b8\u00ad\u00e0\u00b8\u00b4\u00e0\u00b8\u00ad\u00e0\u00b8\u00b4 \u00e0\u00b8\u00ad\u00e0\u00b9\u0088\u00e0\u00b8\u00b2\u00e0\u00b9\u0080\u00e0\u00b8\u0084\u00e0\u00b8\u00a3",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544499781874,
"content": "\u00e0\u00b8\u00ad\u00e0\u00b8\u00b5\u00e0\u00b8\u0081\u00e0\u00b8\u00aa\u00e0\u00b8\u00b1\u00e0\u00b8\u0081\u00e0\u00b8\u009e\u00e0\u00b8\u00b1\u00e0\u00b8\u0081\u00e0\u00b8\u00ad\u00e0\u00b9\u0088\u00e0\u00b8\u00b0\u00e0\u00b8\u0088\u00e0\u00b8\u00b0\u00e0\u00b8\u0099\u00e0\u00b8\u00ad\u00e0\u00b8\u0099\u00e0\u00b9\u0081\u00e0\u00b8\u00a5\u00e0\u00b9\u0089\u00e0\u00b8\u00a7",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544499760368,
"content": "\u00e0\u00b8\u00a1\u00e0\u00b8\u00a3\u00e0\u00b8\u00b6\u00e0\u00b8\u0087\u00e0\u00b8\u00ad\u00e0\u00b9\u0088\u00e0\u00b8\u00b2\u00e0\u00b8\u0099\u00e0\u00b8\u00ad\u00e0\u00b8\u0099\u00e0\u00b8\u0095\u00e0\u00b8\u00ad\u00e0\u00b8\u0099\u00e0\u00b8\u0095\u00e0\u00b9\u0088\u00e0\u00b8\u00ad\u00e0\u00b8\u0084\u00e0\u00b9\u0088\u00e0\u00b8\u00b2\u00e0\u00b8\u00b2 \u00e0\u00b8\u0097\u00e0\u00b8\u00b3\u00e0\u00b8\u0087\u00e0\u00b8\u00b2\u00e0\u00b8\u0099\u00e0\u00b8\u00ad\u00e0\u00b8\u00b5\u00e0\u00b8\u0081",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544499702949,
"content": "Fongbeer \u00e0\u00b9\u0084\u00e0\u00b8\u0094\u00e0\u00b9\u0089\u00e0\u00b8\u00aa\u00e0\u00b9\u0088\u00e0\u00b8\u0087\u00e0\u00b8\u00aa\u00e0\u00b8\u0095\u00e0\u00b8\u00b4\u00e0\u00b8\u0081\u00e0\u00b9\u0080\u00e0\u00b8\u0081\u00e0\u00b8\u00ad\u00e0\u00b8\u00a3\u00e0\u00b9\u008c",
"sticker": {
"uri": "messages/stickers_used/47177151_634556356942025_8071933584455237632_n_568826706848324.png"
},
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544499673450,
"content": "\u00e0\u00b8\u0084\u00e0\u00b8\u00b8\u00e0\u00b8\u0093\u00e0\u00b9\u0084\u00e0\u00b8\u0094\u00e0\u00b9\u0089\u00e0\u00b8\u00aa\u00e0\u00b9\u0088\u00e0\u00b8\u0087\u00e0\u00b8\u00aa\u00e0\u00b8\u0095\u00e0\u00b8\u00b4\u00e0\u00b8\u0081\u00e0\u00b9\u0080\u00e0\u00b8\u0081\u00e0\u00b8\u00ad\u00e0\u00b8\u00a3\u00e0\u00b9\u008c",
"sticker": {
"uri": "messages/stickers_used/47215785_1973869099362245_6482342376906948608_n_499671186782051.png"
},
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544499411993,
"content": "\u00e0\u00b8\u0099\u00e0\u00b8\u00ad\u00e0\u00b8\u0099\u00e0\u00b9\u0086\u00e0\u00b9\u0086",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544499388010,
"content": "\u00e0\u00b8\u0084\u00e0\u00b8\u00b8\u00e0\u00b8\u0093\u00e0\u00b9\u0084\u00e0\u00b8\u0094\u00e0\u00b9\u0089\u00e0\u00b8\u00aa\u00e0\u00b9\u0088\u00e0\u00b8\u0087\u00e0\u00b8\u00aa\u00e0\u00b8\u0095\u00e0\u00b8\u00b4\u00e0\u00b8\u0081\u00e0\u00b9\u0080\u00e0\u00b8\u0081\u00e0\u00b8\u00ad\u00e0\u00b8\u00a3\u00e0\u00b9\u008c",
"sticker": {
"uri": "messages/stickers_used/16781550_2041021616125312_2855785001344040960_n_2041021609458646.png"
},
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544499329973,
"content": "\u00e0\u00b9\u0080\u00e0\u00b8\u00ad\u00e0\u00b8\u00ad",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544499139565,
"content": "\u00e0\u00b8\u0099\u00e0\u00b8\u00b5\u00e0\u00b9\u0088\u00e0\u00b8\u0096\u00e0\u00b9\u0089\u00e0\u00b8\u00b2\u00e0\u00b8\u0097\u00e0\u00b8\u00b3\u00e0\u00b8\u0087\u00e0\u00b8\u00b2\u00e0\u00b8\u0099\u00e0\u00b8\u0081\u00e0\u00b8\u00b8\u00e0\u00b9\u0080\u00e0\u00b8\u009e\u00e0\u00b8\u00a5\u00e0\u00b8\u00b5\u00e0\u00b8\u00a2\u00e0\u00b8\u0095\u00e0\u00b8\u00b2\u00e0\u00b8\u00a2",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544499124519,
"content": "\u00e0\u00b8\u0088\u00e0\u00b8\u00b0\u00e0\u00b8\u0087\u00e0\u00b9\u0088\u00e0\u00b8\u00a7\u00e0\u00b8\u0087\u00e0\u00b8\u0081\u00e0\u00b9\u0089\u00e0\u00b8\u00ad\u00e0\u00b8\u0095\u00e0\u00b8\u00ad\u00e0\u00b8\u0099\u00e0\u00b9\u0080\u00e0\u00b8\u00a2\u00e0\u00b9\u0089\u00e0\u00b8\u0099\u00e0\u00b9\u0086",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544499112780,
"content": "555",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544499084811,
"content": "\u00e0\u00b9\u0081\u00e0\u00b8\u0095\u00e0\u00b9\u0088\u00e0\u00b8\u00a5\u00e0\u00b9\u0088\u00e0\u00b8\u00b0\u00e0\u00b8\u0084\u00e0\u00b8\u0099",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544499080367,
"content": "\u00e0\u00b9\u0080\u00e0\u00b8\u00ad\u00e0\u00b8\u00ad",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544498938281,
"content": "\u00e0\u00b8\u0095\u00e0\u00b8\u00b7\u00e0\u00b9\u0088\u00e0\u00b8\u0099\u00e0\u00b8\u0081\u00e0\u00b9\u0089\u00e0\u00b8\u00ad\u00e0\u00b8\u0095\u00e0\u00b8\u00b53\u00e0\u00b9\u0081\u00e0\u00b8\u00a5\u00e0\u00b9\u0089\u00e0\u00b8\u00a7",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544498928759,
"content": "555 \u00e0\u00b9\u0084\u00e0\u00b8\u00a1\u00e0\u00b9\u0088\u00e0\u00b8\u0087\u00e0\u00b9\u0088\u00e0\u00b8\u00a7\u00e0\u00b8\u0087",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544498850858,
"content": "\u00e0\u00b8\u009b\u00e0\u00b9\u0088\u00e0\u00b8\u00b2\u00e0\u00b8\u0099\u00e0\u00b8\u0099\u00e0\u00b8\u00b5\u00e0\u00b9\u0089\u00e0\u00b9\u0084\u00e0\u00b8\u00a1\u00e0\u00b9\u0088\u00e0\u00b8\u0099\u00e0\u00b8\u00ad\u00e0\u00b8\u0099\u00e0\u00b8\u0099\u00e0\u00b8\u00b0",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544498842550,
"content": "\u00e0\u00b9\u0083\u00e0\u00b8\u008a\u00e0\u00b9\u0088\u00e0\u00b9\u0080\u00e0\u00b8\u00a5\u00e0\u00b8\u00a2\u00e0\u00b8\u0088\u00e0\u00b8\u00b0\u00e0\u00b8\u00ab\u00e0\u00b8\u00a5\u00e0\u00b8\u00b1\u00e0\u00b8\u009a\u00e0\u00b8\u0095\u00e0\u00b8\u00a5\u00e0\u00b8\u00ad\u00e0\u00b8\u0094\u00e0\u00b8\u00ad\u00e0\u00b9\u0088\u00e0\u00b8\u00b0",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544498824123,
"content": "\u00e0\u00b8\u009e\u00e0\u00b8\u00ad\u00e0\u00b9\u0080\u00e0\u00b8\u00a7\u00e0\u00b8\u00a5\u00e0\u00b8\u00b2\u00e0\u00b8\u0097\u00e0\u00b8\u00b3\u00e0\u00b8\u0087\u00e0\u00b8\u00b2\u00e0\u00b8\u0099 \u00e0\u00b9\u0080\u00e0\u00b8\u009e\u00e0\u00b8\u00a5\u00e0\u00b8\u00b5\u00e0\u00b8\u00a2",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544498798880,
"content": "555",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544498781918,
"content": "\u00e0\u00b9\u0080\u00e0\u00b8\u00ad\u00e0\u00b8\u00ad\u00e0\u00b8\u00a7\u00e0\u00b9\u0088\u00e0\u00b8\u00b2\u00e0\u00b8\u0087\u00e0\u00b8\u00b1\u00e0\u00b9\u0089\u00e0\u00b8\u0099\u00e0\u00b8\u0081\u00e0\u00b8\u00a7\u00e0\u00b9\u0088\u00e0\u00b8\u00b2\u00e0\u00b8\u0088\u00e0\u00b8\u00b0\u00e0\u00b8\u0099\u00e0\u00b8\u00ad\u00e0\u00b8\u0099\u00e0\u00b8\u00ad\u00e0\u00b8\u00b5\u00e0\u00b8\u0081\u00e0\u00b8\u0097\u00e0\u00b8\u00b5\u00e0\u00b8\u0095\u00e0\u00b8\u00b2\u00e0\u00b8\u00a2\u00e0\u00b9\u0086",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544498758745,
"content": "555 \u00e0\u00b8\u0097\u00e0\u00b8\u00b5\u00e0\u00b9\u0088\u00e0\u00b8\u00ab\u00e0\u00b8\u00a5\u00e0\u00b8\u00b1\u00e0\u00b8\u0087\u00e0\u00b8\u0099\u00e0\u00b8\u00ad\u00e0\u00b8\u0099\u00e0\u00b9\u0080\u00e0\u00b8\u0097\u00e0\u00b8\u00b5\u00e0\u00b9\u0088\u00e0\u00b8\u00a2\u00e0\u00b8\u0087",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544498616261,
"content": "\u00e0\u00b8\u0099\u00e0\u00b8\u00ad\u00e0\u00b8\u0099\u00e0\u00b9\u0080\u00e0\u00b8\u00a3\u00e0\u00b9\u0087\u00e0\u00b8\u00a7\u00e0\u00b9\u0081\u00e0\u00b8\u00a5\u00e0\u00b9\u0089\u00e0\u00b8\u00a7\u00e0\u00b9\u0080\u00e0\u00b8\u009b\u00e0\u00b9\u0087\u00e0\u00b8\u0099\u00e0\u00b9\u0081\u00e0\u00b8\u009a\u00e0\u00b8\u00a2\u00e0\u00b8\u0099\u00e0\u00b8\u00b5\u00e0\u00b9\u0089\u00e0\u00b8\u0095\u00e0\u00b8\u00a5\u00e0\u00b8\u00ad\u00e0\u00b8\u0094\u00e0\u00b8\u00ad\u00e0\u00b9\u0088\u00e0\u00b8\u00b0",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544498588182,
"content": "\u00e0\u00b8\u0095\u00e0\u00b8\u00b7\u00e0\u00b9\u0088\u00e0\u00b8\u0099\u00e0\u00b9\u0080\u00e0\u00b8\u00a3\u00e0\u00b9\u0087\u00e0\u00b8\u00a7\u00e0\u00b8\u0099\u00e0\u00b8\u00b0",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544474003280,
"content": "\u00e0\u00b9\u0080\u00e0\u00b8\u0084\u00e0\u00b8\u00a3",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544473361272,
"content": "\u00e0\u00b8\u00a7\u00e0\u00b8\u00b1\u00e0\u00b8\u0099\u00e0\u00b8\u00ab\u00e0\u00b8\u00a5\u00e0\u00b8\u00b1\u00e0\u00b8\u0087\u00e0\u00b9\u0080\u00e0\u00b8\u0088\u00e0\u00b8\u00ad\u00e0\u00b8\u0081\u00e0\u00b8\u00b1\u00e0\u00b8\u0099",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544473354162,
"content": "\u00e0\u00b9\u0080\u00e0\u00b8\u0084\u00e0\u00b8\u00a3",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472905690,
"content": "\u00e0\u00b8\u0084\u00e0\u00b8\u00b8\u00e0\u00b8\u0093\u00e0\u00b9\u0084\u00e0\u00b8\u0094\u00e0\u00b9\u0089\u00e0\u00b8\u00aa\u00e0\u00b9\u0088\u00e0\u00b8\u0087\u00e0\u00b8\u00aa\u00e0\u00b8\u0095\u00e0\u00b8\u00b4\u00e0\u00b8\u0081\u00e0\u00b9\u0080\u00e0\u00b8\u0081\u00e0\u00b8\u00ad\u00e0\u00b8\u00a3\u00e0\u00b9\u008c",
"sticker": {
"uri": "messages/stickers_used/47218354_1973871139362041_6407017176045191168_n_499671113448725.png"
},
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472900247,
"content": "555 \u00e0\u00b8\u00ab\u00e0\u00b8\u00a2\u00e0\u00b8\u00b8\u00e0\u00b8\u0094\u00e0\u00b8\u0084\u00e0\u00b9\u0088\u00e0\u00b8\u00b0 \u00e0\u00b8\u0081\u00e0\u00b8\u00b8\u00e0\u00b8\u00a5\u00e0\u00b9\u0088\u00e0\u00b8\u00b2\u00e0\u00b8\u0087\u00e0\u00b8\u00ab\u00e0\u00b8\u0099\u00e0\u00b9\u0089\u00e0\u00b8\u00b2\u00e0\u00b9\u0081\u00e0\u00b8\u00a3\u00e0\u00b9\u0089\u00e0\u00b8\u00a7",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544472882848,
"content": "\u00e0\u00b9\u0084\u00e0\u00b8\u0094\u00e0\u00b9\u0089\u00e0\u00b8\u0099\u00e0\u00b8\u00b0",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544472879820,
"content": "\u00e0\u00b8\u00ab\u00e0\u00b8\u00a3\u00e0\u00b8\u00b7\u00e0\u00b8\u00ad\u00e0\u00b8\u00ad\u00e0\u00b8\u00a2\u00e0\u00b8\u00b2\u00e0\u00b8\u0081\u00e0\u00b9\u0080\u00e0\u00b8\u0088\u00e0\u00b8\u00ad\u00e0\u00b8\u00a7\u00e0\u00b8\u00b1\u00e0\u00b8\u0099\u00e0\u00b8\u0099\u00e0\u00b8\u00b5\u00e0\u00b9\u0089",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544472863546,
"content": "\u00e0\u00b9\u0080\u00e0\u00b8\u0084\u00e0\u00b8\u00a3",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472863018,
"content": "\u00f0\u009f\u0092\u008b",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472859922,
"content": "\u00e0\u00b9\u0084\u00e0\u00b8\u00a7\u00e0\u00b9\u0089\u00e0\u00b9\u0080\u00e0\u00b8\u0088\u00e0\u00b8\u00ad\u00e0\u00b8\u0081\u00e0\u00b8\u00b1\u00e0\u00b8\u0099",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472854070,
"content": "\u00e0\u00b9\u0080\u00e0\u00b8\u0084\u00e0\u00b9\u0086",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472851485,
"content": "\u00e0\u00b8\u00ad\u00e0\u00b8\u00ad",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544472850192,
"content": "\u00e0\u00b9\u0083\u00e0\u00b8\u008a\u00e0\u00b9\u0088",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544472848487,
"content": "\u00e0\u00b8\u0081\u00e0\u00b8\u00b3\u00e0\u00b8\u00a5\u00e0\u00b8\u00b1\u00e0\u00b8\u0087\u00e0\u00b8\u0081\u00e0\u00b8\u00a5\u00e0\u00b8\u00b1\u00e0\u00b8\u009a\u00e0\u00b8\u009a\u00e0\u00b9\u0089\u00e0\u00b8\u00b2\u00e0\u00b8\u0099",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472846015,
"content": "\u00e0\u00b9\u0080\u00e0\u00b8\u00a5\u00e0\u00b8\u00b4\u00e0\u00b8\u0081\u00e0\u00b8\u0087\u00e0\u00b8\u00b2\u00e0\u00b8\u0099\u00e0\u00b9\u0081\u00e0\u00b8\u00a5\u00e0\u00b9\u0089\u00e0\u00b8\u00a7\u00e0\u00b8\u00ab\u00e0\u00b8\u00a3\u00e0\u00b8\u00ad",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472834056,
"content": "\u00e0\u00b8\u00a2\u00e0\u00b8\u00b8\u00e0\u00b9\u0084\u00e0\u00b8\u00ab\u00e0\u00b8\u0099",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544472818396,
"content": "Fongbeer \u00e0\u00b9\u0084\u00e0\u00b8\u0094\u00e0\u00b9\u0089\u00e0\u00b8\u00aa\u00e0\u00b9\u0088\u00e0\u00b8\u0087\u00e0\u00b8\u00aa\u00e0\u00b8\u0095\u00e0\u00b8\u00b4\u00e0\u00b8\u0081\u00e0\u00b9\u0080\u00e0\u00b8\u0081\u00e0\u00b8\u00ad\u00e0\u00b8\u00a3\u00e0\u00b9\u008c",
"sticker": {
"uri": "messages/stickers_used/47212809_540269436489961_551692272907845632_n_399316793918560.png"
},
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472808417,
"content": "\u00e0\u00b8\u0084\u00e0\u00b8\u00b8\u00e0\u00b8\u0093\u00e0\u00b9\u0084\u00e0\u00b8\u0094\u00e0\u00b9\u0089\u00e0\u00b8\u0095\u00e0\u00b8\u00b1\u00e0\u00b9\u0089\u00e0\u00b8\u0087\u00e0\u00b8\u0084\u00e0\u00b9\u0088\u00e0\u00b8\u00b2\u00e0\u00b8\u00ad\u00e0\u00b8\u00b5\u00e0\u00b9\u0082\u00e0\u00b8\u00a1\u00e0\u00b8\u0088\u00e0\u00b8\u00b4\u00e0\u00b9\u0080\u00e0\u00b8\u009b\u00e0\u00b9\u0087\u00e0\u00b8\u0099 \u00f0\u009f\u0092\u008b",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472799256,
"content": "\u00e0\u00b8\u0084\u00e0\u00b8\u00b8\u00e0\u00b8\u0093\u00e0\u00b9\u0084\u00e0\u00b8\u0094\u00e0\u00b9\u0089\u00e0\u00b9\u0080\u00e0\u00b8\u009b\u00e0\u00b8\u00a5\u00e0\u00b8\u00b5\u00e0\u00b9\u0088\u00e0\u00b8\u00a2\u00e0\u00b8\u0099\u00e0\u00b8\u00aa\u00e0\u00b8\u00b5\u00e0\u00b8\u0082\u00e0\u00b8\u00ad\u00e0\u00b8\u0087\u00e0\u00b8\u0081\u00e0\u00b8\u00b2\u00e0\u00b8\u00a3\u00e0\u00b9\u0081\u00e0\u00b8\u008a\u00e0\u00b8\u0097",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472767305,
"content": "\u00e0\u00b9\u0080\u00e0\u00b8\u0084\u00f0\u009f\u0098\u0098",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544472739490,
"content": "\u00e0\u00b8\u0088\u00e0\u00b8\u00b1\u00e0\u00b8\u0094\u00e0\u00b9\u0084\u00e0\u00b8\u009b",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544472736760,
"content": "\u00e0\u00b9\u0080\u00e0\u00b8\u0084\u00e0\u00b8\u00a3",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472659564,
"content": "\u00e0\u00b8\u0084\u00e0\u00b8\u00b8\u00e0\u00b8\u0093\u00e0\u00b9\u0084\u00e0\u00b8\u0094\u00e0\u00b9\u0089\u00e0\u00b8\u00aa\u00e0\u00b9\u0088\u00e0\u00b8\u0087\u00e0\u00b8\u00aa\u00e0\u00b8\u0095\u00e0\u00b8\u00b4\u00e0\u00b8\u0081\u00e0\u00b9\u0080\u00e0\u00b8\u0081\u00e0\u00b8\u00ad\u00e0\u00b8\u00a3\u00e0\u00b9\u008c",
"sticker": {
"uri": "messages/stickers_used/47280347_634562256941435_8883119913007316992_n_568554630208865.png"
},
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472642225,
"content": "555\u00e0\u00b8\u00ad\u00e0\u00b8\u00a2\u00e0\u00b8\u00b2\u00e0\u00b8\u0081\u00e0\u00b9\u0080\u00e0\u00b8\u00a1\u00e0\u00b8\u00b2\u00e0\u00b8\u00ad\u00e0\u00b8\u00a2\u00e0\u00b8\u00b2\u00e0\u00b8\u0081\u00e0\u00b9\u0080\u00e0\u00b8\u0095\u00e0\u00b9\u0089\u00e0\u00b8\u0099\u00e0\u00b8\u00ab\u00e0\u00b8\u00a5\u00e0\u00b8\u00b2\u00e0\u00b8\u00a2\u00e0\u00b8\u00a7\u00e0\u00b8\u00b1\u00e0\u00b8\u0099\u00e0\u00b9\u0081\u00e0\u00b8\u00a5\u00e0\u00b9\u0089\u00e0\u00b8\u00a7",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544472627176,
"content": "555",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544472623852,
"content": "\u00e0\u00b8\u009e\u00e0\u00b8\u00ad\u00e0\u00b8\u0094\u00e0\u00b8\u00b5\u00e0\u00b9\u0080\u00e0\u00b8\u00a5\u00e0\u00b8\u00a2",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544472617829,
"content": "\u00e0\u00b8\u0081\u00e0\u00b8\u00a3\u00e0\u00b8\u00b8\u00e0\u00b8\u00ab\u00e0\u00b8\u00b2\u00e0\u00b9\u0080\u00e0\u00b8\u00ab\u00e0\u00b8\u00a1\u00e0\u00b8\u00b7\u00e0\u00b8\u00ad\u00e0\u00b8\u0099\u00e0\u00b8\u0081\u00e0\u00b8\u00b1\u00e0\u00b8\u0099",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472598965,
"content": "\u00e0\u00b9\u0084\u00e0\u00b8\u0094\u00e0\u00b9\u0089\u00e0\u00b9\u0086",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472595093,
"content": "\u00e0\u00b8\u0081\u00e0\u00b8\u00b8\u00e0\u00b8\u00ab\u00e0\u00b8\u00b2\u00e0\u00b8\u00ab\u00e0\u00b8\u00b2\u00e0\u00b9\u0080\u00e0\u00b8\u009e\u00e0\u00b8\u00b7\u00e0\u00b9\u0088\u00e0\u00b8\u00ad\u00e0\u00b8\u0099\u00e0\u00b9\u0080\u00e0\u00b8\u0097\u00e0\u00b8\u00b5\u00e0\u00b9\u0088\u00e0\u00b8\u00a2\u00e0\u00b8\u00a7\u00e0\u00b8\u00a2\u00e0\u00b8\u00b8\u00e0\u00b8\u009e\u00e0\u00b8\u00ad\u00e0\u00b8\u0094\u00e0\u00b8\u00b5",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544472582666,
"content": "\u00e0\u00b8\u00ab\u00e0\u00b9\u0089\u00e0\u00b8\u00b2\u00e0\u00b8\u00a1\u00e0\u00b8\u009a\u00e0\u00b8\u00ad\u00e0\u00b8\u0081\u00e0\u00b9\u0083\u00e0\u00b8\u0084\u00e0\u00b8\u00a3",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544472572509,
"content": "\u00e0\u00b9\u0084\u00e0\u00b8\u009b\u00e0\u00b8\u00aa\u00e0\u00b8\u00ad\u00e0\u00b8\u0087\u00e0\u00b8\u0084\u00e0\u00b8\u0099\u00e0\u00b8\u0099\u00e0\u00b8\u00b0",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472565957,
"content": "\u00e0\u00b9\u0080\u00e0\u00b8\u0084",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472561931,
"content": "\u00e0\u00b9\u0084\u00e0\u00b8\u0094\u00e0\u00b9\u0089\u00e0\u00b8\u0088\u00e0\u00b9\u0089\u00e0\u00b8\u00b2",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544472560028,
"content": "\u00e0\u00b9\u0080\u00e0\u00b8\u0084\u00e0\u00b8\u00a3\u00e0\u00b8\u009b\u00e0\u00b9\u0088\u00e0\u00b8\u00b0",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544472551863,
"content": "\u00e0\u00b9\u0084\u00e0\u00b8\u00a1\u00e0\u00b9\u0088\u00e0\u00b9\u0080\u00e0\u00b8\u0081\u00e0\u00b8\u00b4\u00e0\u00b8\u009420",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472549013,
"content": "\u00e0\u00b8\u00ab\u00e0\u00b8\u00b1\u00e0\u00b9\u0089\u00e0\u00b8\u00a2\u00e0\u00b8\u0097\u00e0\u00b8\u00b5\u00e0\u00b8\u0081\u00e0\u00b8\u009a\u00e0\u00b8\u00ad\u00e0\u00b8\u0081\u00e0\u00b8\u0099\u00e0\u00b8\u00b4",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472538817,
"content": "\u00e0\u00b9\u0084\u00e0\u00b8\u0094\u00e0\u00b9\u0089\u00e0\u00b9\u0080\u00e0\u00b8\u00a3\u00e0\u00b8\u00a2",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544472500376,
"content": "\u00e0\u00b8\u009a\u00e0\u00b8\u00ad\u00e0\u00b8\u0081\u00e0\u00b8\u00ad\u00e0\u00b8\u00b5\u00e0\u00b8\u0081\u00e0\u00b8\u0097\u00e0\u00b8\u00b5",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544472496016,
"content": "\u00e0\u00b8\u00a7\u00e0\u00b8\u00b1\u00e0\u00b8\u0099\u00e0\u00b8\u00ab\u00e0\u00b8\u00a2\u00e0\u00b8\u00b8\u00e0\u00b8\u0094",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544472492381,
"content": "\u00e0\u00b9\u0084\u00e0\u00b8\u009b\u00e0\u00b9\u0084\u00e0\u00b8\u00ab\u00e0\u00b8\u00a1",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472485301,
"content": "555",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472483414,
"content": "\u00e0\u00b8\u00ad\u00e0\u00b8\u00ad",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544472480457,
"content": "\u00e0\u00b9\u0084\u00e0\u00b8\u009b\u00e0\u00b9\u0080\u00e0\u00b8\u0097\u00e0\u00b8\u00b5\u00e0\u00b9\u0088\u00e0\u00b8\u00a2\u00e0\u00b8\u00a7\u00e0\u00b9\u0084\u00e0\u00b8\u0087",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472473765,
"content": "555",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472471480,
"content": "\u00e0\u00b9\u0080\u00e0\u00b8\u00a3\u00e0\u00b8\u00b2\u00e0\u00b8\u0084\u00e0\u00b8\u00b8\u00e0\u00b8\u00a2\u00e0\u00b9\u0080\u00e0\u00b8\u00a3\u00e0\u00b8\u00b7\u00e0\u00b9\u0088\u00e0\u00b8\u00ad\u00e0\u00b8\u0087\u00e0\u00b9\u0084\u00e0\u00b8\u00a3\u00e0\u00b8\u0099\u00e0\u00b8\u00b4",
"type": "Generic"
},
{
"sender_name": "Fongbeer Wichuda",
"timestamp_ms": 1544472470745,
"content": "\u00e0\u00b9\u0084\u00e0\u00b8\u00a3",
"type": "Generic"
},
{
"sender_name": "Angkana Taprab",
"timestamp_ms": 1544472463703,
"content": "\u00e0\u00b9\u0080\u00e0\u00b8\u0094\u00e0\u00b8\u00b5\u00e0\u00b8\u00a2\u00e0\u00b8\u00a7\u00e0\u00b9\u0086",
"type": "Generic"
}
],
"title": "Fongbeer Wichuda",
"is_still_participant": true,
"thread_type": "Regular",
"thread_path": "inbox/FongbeerWichuda_Y0mg52eSDQ

Naraporn Benz

Re: การถอดรหัสและเข้ารหัส JSON เบื้องต้นด้วยภาษา Python

Postby Naraporn Benz » 09/03/2019 11:14 am

"\ u00e0 \ u00b8 \ u0096 \ u00e0 \ u00b9 \ u0089 \ u00e0 \ u00b8 \ u00b2 \ u00e0 \ u00b8 \ u00a1 \ u00e0 \ u00b8 \ u00b1 \ u00e0 \ u00b8 \ u0099 \ u00e0 \ u00b9 \ u0082 \ u00e0 \ u00b8 \ u0097 \ u00e0 \ u00b8 \ u00a3 \ u00e0 \ u00b9 \ u0084 \ u00e0 \ u00b8 \ u009b \ u00e0 \ u00b8 \ u0097 \ u00e0 \ u00b8 \ u00b1 \ u00e0 \ u00b8 \ u0081 \ u00e0 \ u00b8 \ u00a1 \ u00e0 \ u00b8 \ u00b2 \ u00e0 \ u00b8 \ u009a \ u00e0 \ u00b8 \ u00ad \ u00e0 \ u00b8 \ u0081 \ u00e0 \ u00b8 \ u0094 \ u00e0 \ u00b9 \ u0089 \ u00e0 \ u00b8 \ u00a7 \ u00e0 \ u00b8 \ u00a2 \ u00e0 \ u00b8 \ u0099 \ u00e0 \ u00b8 \ u00b0 "


Return to “Python Knowledge”

Who is online

Users browsing this forum: facebook.com [Crawler] and 39 guests