在用 flask 框架向前端返回 json 格式数据时,出现中文乱码,查了一下找到解决方法:

给json.dumps() 方法设置第二个参数 json.dumps(obj, ensure_ascii=False)

 

GitHub 加速计划 / js / json
55
5
下载
适用于现代 C++ 的 JSON。
最近提交(Master分支:26 天前 )
281d1e92 1 天前
7421ac31 Changed the example code in the documentation from copy initialization to direct initialization for `json::json_pointer`. This prevents compilation errors caused by the constructor being explicit. 2 天前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐