Python中文
首页
教程
问答
标签
搜索
登录
注册
json.loads列出非di
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我遇到了一个谷歌无法为我解决的问题。在</p> <p>我知道<code>json.loads(var.text)</code>将返回一个<code>dict</code>,在某些情况下,我也会这样做。在</p> <p>假设数据如下:</p> <pre><code>{ "PROJECT_ID": 3351040882, "common.ALLTYPES_DESCRIPTION": "", "servermain.PROJECT_TITLE": "", } </code></pre> <p>此数据将作为<code>dict</code>加载!在</p> <p>下面是作为列表加载的数据示例。在</p> ^{pr2}$ <p>根据我的研究,我知道第二个输出是<code>dict</code>的<code>list</code>。有没有什么简单的函数可以将<code>list</code>加载到<code>dict</code>?在</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>你的单子里好像只有一本字典。然后只需通过索引访问它:</p> <pre><code>json.loads(var.text)[0] </code></pre>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
(编辑)背景2+均值漂移跟踪?
10 回答
(网络爬虫)如何从新闻网站获取新闻段落的文本
1 回答
(置换)列表的唯一组合
3 回答
(美丽的soap4,)AttributeError:“非类型”对象没有属性“获取文本”
3 回答
(聊天室)使用套接字通常只允许一个地址(协议/网络地址/端口)
5 回答
(自动)在Pycharm/Python中的=后缩进
1 回答
(自动Py到Exe和Python)找不到“googleapipythonclient”发行版,该发行版是应用程序所必需的
10 回答
(自动操作)write()和do for循环的Odoo问题
10 回答
(自定义)百分位MSE损失函数
2 回答
(自定义用户)createsuperuser TypeError:hasattr():属性名必须是字符串
2 回答
(节点)警告:检测到可能的EventEmitter内存泄漏。添加了11个消息侦听器。使用emitter.setMaxListeners()增加limi
7 回答
(若变量中有字符串)语句未筛选出数据
8 回答
(英语、Perl、Python、Ruby)在代码片段的基础上进行比较?
10 回答
(范围(1,36),7)和+条件下的所有组合
5 回答
(范围(3),范围(3))值错误:要解压缩的值太多(预期为2)
2 回答
(蟒蛇) 平均分配数字
3 回答
(行、列):数据帧的值
3 回答
(行、列)形式的最小值
3 回答
(解决)导入PYBID11/C++编译模块不工作
7 回答
(记忆有效)将“排序”作为生成器实现
7 回答