Now I have a string in format dict but as i can guess its a json format its look like:
{
"gid":"1201400250397201",
"memberships":[
"can be nested objects",
...
],
"name":"Name of task",
"parent":{
"gid":"1201400250397199",
"name":"name of parent task"
},
"permalink_url":"https://url...."
}
So first question: am i right? I used
dumps()
from json library but got unicode escape sequences,loads()
didnt work for me, i got error "the JSON object must be str, bytes or bytearray, not dict".Second question: if its not json format, how can i get comfortable view? I did it: first of all i get dict-line, then I print a dictionary's key:
for key in task: task print(task[key])
output:
1201400250397201 [] Name of task {'gid': '1201400250397199', 'name': ''name of parent task'} https://url....
At actually it would be great if I get something like that:
gid: 1201400250397201
name: Name of task
parent_name: 'Name of task' etc
But I dont know how to get it :(
Next question: as you can see for part "parent" (penultimate line) I also get dictionary, how can I extract it and get convenient format? Or maybe you have your comfortable methods?