简体   繁体   English

我不知道如何在我的 web 应用程序中使用 Z319C34606A7D4A9767

[英]I don't know how to select specific items from jsonnified object in my web application using flask

response = requests.get(url)
response_json = response.json()
results = response_json['a'][0]
output = results['a_1'] + results['a_2'] + results['a_3']
return jsonify(output)

my output我的 output
"abcdefg" “abcdefg”

what I want我想要的是
abcdefg abcdefg

I'm creating a web app using heroku and when I open the web application I want to return the output without "".我正在使用 heroku 创建一个 web 应用程序,当我打开 web 应用程序时,我想返回 Z78E622681F6393F14CE356"。 I mean to display output without "".我的意思是在没有“”的情况下显示 output。

How should I fix it?我应该如何解决它?

Write

return output

instead of代替

return jsonify(output)

Returning a string returns a string without the quotes.返回一个字符串会返回一个不带引号的字符串。 Jsonifying returns a representation of JSON. Jsonifying 返回 JSON 的表示。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 I don't know how to select specific items from json object in my web application using flask - I don't know how to select specific items from json object in my web application using flask web 数据抓取问题我不知道如何从文件中导出信息。html 到我的 python 程序 - web scraping problem with data i don't know how to export information from file.html to my python programme 我不知道如何在我的游戏中显示可供用户选择的课程列表? - I don't know how to show a list of classes for user to choose from in my game? 我不知道如何使我的匹配系统正常工作 - I don't know how to make my matching system work 从字符串中解析 XML 报告“垃圾”在我的文件中,我不知道如何找到它 - Parsing XML from string reports “junk” in my file, I don't know how to locate it Python:我的代码出错,我不知道如何修复它 - Python: Error in my code and i don't know how to fix it 我不知道如何将 .html 文件之一从测验应用程序连接到 django 应用程序。 (找不到页面 (404)) - I don't know how to connect one of the .html files from the quiz application to the django application. (Page not found (404)) 我不知道我的数据库名称 - I don't know my Database name 我不知道这是什么错误,它是 flask 和 url_for function - I don't know what error is this it is flask and with url_for function 如何使用 Flask、GitHub 和 Heroku 将我的 Tensorflow 深度学习模型部署为 Web 应用程序 - How can I deploy my Tensorflow Deep Learning model as a web application using Flask, GitHub and Heroku
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM