From 243828f097b4ec6e1ad6ad1c28f93c5b5f3994fb Mon Sep 17 00:00:00 2001 From: Cannon Lock Date: Thu, 24 Feb 2022 12:32:22 -0600 Subject: [PATCH] Serve projects as JSON as well as XML (SOFTWARE-5051) --- src/app.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app.py b/src/app.py index fd1f53959..87d4beb45 100755 --- a/src/app.py +++ b/src/app.py @@ -172,6 +172,11 @@ def miscproject_xml(): return Response(to_xml_bytes(global_data.get_projects()), mimetype='text/xml') +@app.route('/miscproject/json') +def miscproject_json(): + return Response(to_json_bytes(global_data.get_projects()), mimetype='application/json') + + @app.route('/vosummary/xml') def vosummary_xml(): return _get_xml_or_fail(global_data.get_vos_data().get_tree, request.args)