如题,用 python 处理下数据库内容,发现数据都以 json 字符串保存在一列里面。 想用 flask 把数据显示出来,有啥好办法没?必须得读取后用 json dump 处理,我看 mysql5.7 支持 json 直接处理,这里数据项太多,查询不知道速度然后!
数据列是这样的
`id`, `create_time`, `json_str`, `time`, `type`, `typeshow`, `uid`
json 数据保存在 json_str 这列
json_str 这列内容如下
{"address":"内蒙古自治区包头市农村商业银行(狮西分理处)","bianhao":"","changguiid":0,"lat":"23.177047526041665","lishiid":3,"lon":"112.96525254991319","pi3LiangEntity":{"biaozhunzhi":"","ceshitiaojian":1,"ceshitiaojianShow":"压","chongdia3nzhuangtai":0,"chongdianzhuangtaiShow":"充","dianchi3biaozhun":"","dianchileixing":"普通","dianchi3pingpai":"","hegedianyazhi":"12.60","lingbujianhaop":"105","pi3LiangItemEntityList":[{"beizhu":"","dianya":"12.8","dianya2":"","erweima":"","hege1":"","hege2":"","jieguo":"","piliangid":4,"piliangitemid":9,"qicheerweima":"","qicheshoudongma":"","shoudongma":"","soc":0,"soh":0,"time":1546759767792}],"piliangid":4,"riqima":"","zifu":""},"piliangid":4,"time":1546759757201,"timeShow":"2019-1-6 15:29:17","type":0,"uid":1,"xiTongEntity":{"beizhu":"","dianchima":"","dianya1":"","dianya2":"","dianya3":"","dianya4":"","erweidianchima":"","erweiqichema":"","gaodi1":"","gaodi2":"","gaodi3":"","gaodi4":"","qichema":"","time":0,"xitongid":0},"xitongid":0}
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.