There is a service and there is a base. It is necessary to check that the service receives the same that the base gives. From the service by a GET request I get JSON. But from the base here is:
(datetime.date(2019, 3, 18), 20) (datetime.date(2019, 3, 19), 20) (datetime.date(2019, 3, 20), 20) (datetime.date(2019, 3, 21), 20) How do i decode this in json?
Code:
r = requests.get(url) recv = r.content.decode('utf-8') print(r.status_code) print(recv) print("Opened database successfully") cursor = conn.cursor() cursor.execute("select.......") record = cursor.fetchall() for dat in record: print(dat)