osmo-smdpp: Actually dump Rx/Tx JSON in JSON format and not as python dict

Change-Id: Ieea3fd2d0f0239acfa6a5c4cfdbfd558d1a3e0ea
This commit is contained in:
Harald Welte
2024-01-17 19:36:47 +01:00
parent 0311c92e96
commit ebb6f7f938

View File

@@ -252,13 +252,13 @@ class SmDppHttpServer:
# TODO: reject any non-JSON Content-type # TODO: reject any non-JSON Content-type
content = json.loads(request.content.read()) content = json.loads(request.content.read())
print("Rx JSON: %s" % content) print("Rx JSON: %s" % json.dumps(content))
set_headers(request) set_headers(request)
output = func(self, request, content) or {} output = func(self, request, content) or {}
build_resp_header(output) build_resp_header(output)
print("Tx JSON: %s" % output) print("Tx JSON: %s" % json.dumps(output))
return json.dumps(output) return json.dumps(output)
return _api_wrapper return _api_wrapper