Spaces:
Sleeping
Sleeping
| from flask import Flask, request, jsonify | |
| app = Flask(__name__) | |
| 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 | |