无法散列的Python

时间:2019-05-24 13:52:08

标签: python json dictionary

我正在尝试将JSON发送到API,因此我构建了一个数组以     转换为JSON,但在转换之前我得到'TypeError:     无法散列     类型:'dict'     我是Python的新手,但我认为dict是与价值相关的关键     像数组一样,我已经用较短的字典来做到这一点,     所以我不明白!     有人可以帮我吗??

first_request = 
 {'data_defs':
{
 {'source':{'name':'aggregates'},
  'time':{'duration':'last 10 minutes'},
  'columns':      
{'host_group.id','host_group.name','sum_traffic.total_bytes' },         
  'group_by':{'host_group.id'}
 }
}
}

0 个答案:

没有答案