Feedparser output isn't in the correct JSON Format. Unable to deserialize into objects
Closed this issue · 4 comments
lvkoppen commented
kurtmckee commented
feedparser doesn't produce JSON.
It sound like you're printing the dictionary that feedparser returns and assuming that this is JSON output, or writing a representation of the result to a file. In this case, Python uses single quotes in the string representation of the dictionary.
You must import Python's json
module (which is built into the standard library) construct a dictionary with the structure you want, then call json.dumps(your_dictionary_here)
, which will generate a JSON-formatted string that you can either print or write to a file.
lvkoppen commented
MB, I realised this now.
Op ma 12 okt. 2020 om 14:47 schreef Kurt McKee <notifications@github.com>:
… Closed #246 <#246>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#246 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKYEXYQL37WY43GWSHGETRTSKL3GJANCNFSM4SMPQYMA>
.
kurtmckee commented
No problem, hope that gets you on track for the software you're creating!
lvkoppen commented
I must say I'm very glad I stumbled upon your library because all other
libraries and software were pretty outdated.
Thanks for the quick reply and keep up the good work!
Op ma 12 okt. 2020 om 22:13 schreef Kurt McKee <notifications@github.com>:
… No problem, hope that gets you on track for the software you're creating!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#246 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKYEXYR5IYBOMMQWKIUT3ODSKNPNPANCNFSM4SMPQYMA>
.