Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 |
Tags
- MySQL
- ubuntu
- python
- PyQt
- ASP
- 라즈베리파이
- 날짜
- flutter
- GIT
- swift
- 다이어트
- 유니티
- MS-SQL
- Unity
- Excel
- 맛집
- PER
- PyQt5
- pandas
- tensorflow
- node.js
- javascript
- Linux
- 함수
- urllib
- mssql
- IOS
- sqlite
- port
- 리눅스
Archives
목록2018/11/24 (1)
아미(아름다운미소)
python json 송수신
json은 URL요청시 입출력 데이터로 많이 활용됩니다. 예제) import json import urllib.request url = "http://www.test.com" # URL d = {'name': '테스트', 'birth': '0703', 'age': 47} params = json.dumps(d).encode("utf-8") # encode: 문자열을 바이트로 변환 req = urllib.request.Request(url, data=params, headers={'content-type': 'application/json'}) response = urllib.request.urlopen(req) print(response.read().decode('utf8')) # decode: 바이트를..
랭귀지/python
2018. 11. 24. 17:27