I've been trying to make newline on JSON Format, but none of it doesn't work.
from flask import *
import json
app = Flask(__name__)
@app.route("/user/", methods=["GET"])
def user():
datajson = {"Author": "Stawa",
"Version": "0.1.7"}
json_format = json.dumps(datajson, indent=6)
return render_template("index.html", json_format=json_format)
in index.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>TEST</title>
<meta charset="utf-8">
</head>
<body>
<p>{{ json_format }}</p>
</body>
</html>
The out put was {"Author": "Stawa", "Version": "0.1.7"}, but I want to make it as
{
"Author": "Stawa",
"Version": "0.1.7"
}