我已将一个值存储到一个变量中。下面是-
itemID = item['witId']
print "new ID is :" +str(itemID)
现在我要将itemId的值传递到以下字典中:
data = '{"witIds": ["itemID "], "widgetExpiryDate":"12.06.2015 09:12:00.UTC" , "firstAlertDate":"11.06.2015 04:06:00.UTC","secondAlertDate":"11.06.2015 05:02:00.UTC" }'
这段代码告诉我itemID
是无效的。你知道吗
我想这就是你想要的:
如果您试图将该JSON转换为字典,则可以使用
json
模块:相关问题 更多 >
编程相关推荐