mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 16:56:30 -06:00
Format JSON more efficiently. This can significantly reduce response sizes from the server.
This commit is contained in:
parent
fe9bdc62a1
commit
1504d05cdd
@ -55,7 +55,7 @@ def make_json_response(
|
|||||||
doc['data'] = data
|
doc['data'] = data
|
||||||
|
|
||||||
return Response(
|
return Response(
|
||||||
response=json.dumps(doc, cls=DataTypeJSONEncoder),
|
response=json.dumps(doc, cls=DataTypeJSONEncoder, separators=(',',':')),
|
||||||
status=status,
|
status=status,
|
||||||
mimetype="application/json",
|
mimetype="application/json",
|
||||||
headers=get_no_cache_header()
|
headers=get_no_cache_header()
|
||||||
@ -65,7 +65,7 @@ def make_json_response(
|
|||||||
def make_response(response=None, status=200):
|
def make_response(response=None, status=200):
|
||||||
"""Create a JSON response handled by the backbone models."""
|
"""Create a JSON response handled by the backbone models."""
|
||||||
return Response(
|
return Response(
|
||||||
response=json.dumps(response, cls=DataTypeJSONEncoder),
|
response=json.dumps(response, cls=DataTypeJSONEncoder, separators=(',',':')),
|
||||||
status=status,
|
status=status,
|
||||||
mimetype="application/json",
|
mimetype="application/json",
|
||||||
headers=get_no_cache_header()
|
headers=get_no_cache_header()
|
||||||
|
Loading…
Reference in New Issue
Block a user