check for null fields in json python
A very naive question but is there a robust or better way to do following.
Say it has nothing to do with json actually.
let say I have list (reading from file)
string_list = [ "foo",1,None, "null","[]","bar"]
Now, null and [] are essentially equivalent of null but different data
structures have different interpretation of "None"?? right?
So rather than me writing a regex for all these rules.. is there a better
way to convert "null","[]" etc to None.. ??
Thanks
No comments:
Post a Comment