View Single Post
Old 10-18-2019, 05:45 PM   #11
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 856
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by Frenzie View Post
None is Python null. You'd think the JSON library would convert it to null though, not string "None" (which isn't what "None" is, anyway).
Yeah, it doesn't. Which is highly frustrating when trying to decode a timestamp, because of course the parser errors out when it sees "None" instead of a RFC3339 formatted timestamp.

What's really annoying is that null is used elsewhere in the JSON.

EDIT: Just thinking about it a bit more, the problem probably isn't with the JSON encoder, but rather that "None" may have been stored as a string in the metadata database.

Last edited by sherman; 10-18-2019 at 05:53 PM.
sherman is offline   Reply With Quote