Sabih555's picture
fixed file
048457c
raw
history blame contribute delete
481 Bytes
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/modify_json', methods=['POST'])
def modify_json():
# Get JSON input from the request
input_json = request.get_json()
# Modify the JSON (for demonstration, simply adding a key 'modified' with value True)
input_json['modified'] = True
# Return modified JSON as response
return jsonify(input_json)
if __name__ == '__main__':
app.run(debug=True) # Run the app in debug mode