Pythonã®ãã¤ã¯ããã¬ã¼ã ã¯ã¼ã¯Flaskã§ã¯ JSONãè¿å´ããããã®ã¡ã½ããjsonifyãå®ç¾©ããã¦ããã from flask import Flask from flask import jsonify app=Flask(__name__) @app.route('/test.json') def test_json(): return jsonify(res='test') if __name__ == '__main__': app.run() /test.jsonã§ãªã¯ã¨ã¹ããã㨠{ res:'test' } ã¨ããçµæã帰ã£ã¦ãã JSONPã«ãããå ´åã¯jsonifyã¯ä½¿ããªãã @app.route('/test.jsonp') def test_jsonp(): import json request.args.get('callback') + '(' +
{{#tags}}- {{label}}
{{/tags}}