擅长:python、mysql、java
<p>我不太清楚你在问什么,这有帮助吗?
你是怎么收到这些微博的,一次一条的?在</p>
<pre><code>import json
json_serial = 'tweet'
my_json = {
'content': [
{"text": "tweet one",
"rt": '1',
"favs":'3',
},
{"text": "another tweet",
"rt": '2',
"favs":'9',
},
{"text": "yet another tweet",
"rt": '3',
"favs":'6',
},
]
}
print(json.dumps(my_json))
$ python json-python.py
{"content": [{"rt": "2", "text": "tweet", "favs": "3"}, {"rt": "2", "text": "tweet", "favs": "3"}, {"rt": "2", "text": "tweet", "favs": "3"}]}
</code></pre>