jsonify()

차노·2023년 8월 8일
0

jsonify() function in the Flask web framework for Python that converts the output of a function to a JSON response object.

jsonify 함수는 함수의 결과를 제이슨 response 객체로 바꿔주는 파이선의 웹 프레임워크인 플라스크에서 이루어진다. 플라스크(함수의 결과 -> response 객체)

The jsonify() function is useful in Flask apps because it automatically sets the correct response headers and content type for JSON responses, and allows you to easily return JSON-formatted data from your route handlers.

jsonify() 함수는 자동적으로 제이슨 response 형태의 자료와 정확한 resonse 헤더를 설정하기 때문에 플라스크 앱에서 매우 유용하며, 핸들러로부터 받은 제이슨 형태의 데이터를 쉽게 리턴시킨다.

This makes it easier and more convenient to create APIs that return JSON data.

제이슨을 반환하는 api를 만드는 매우 편리하다

This function takes in one or more positional arguments, which represent the data to be converted to a JSON reponse object, and any number of keyword arguments, which are used to cutomize the JSON response object.

이 함수는 하나 또는 그 이상의 위치 인자를 받고, 제이슨 response 객채로 변환시키는 데이터와 키워드 argument의 수를 나타낸다.

Reference

0개의 댓글