Python中用eval將字符串轉換爲字典時候出錯:NameError: name ‘null’ is not defined的解決方法

這兩天在用python調用接口時,由於接口返回的是str類型的數據,形如: python 由於這樣的str相似字典,因此我想把它轉爲字典以便處理,使用的是eval來進行轉換,以下:json <pre name="code" class="python">a='{"errno":0,"errmsg":null,"unassigned":0,"total":0,"list":null}' a=eval
相關文章
相關標籤/搜索