From 03f8292cedc6e16b6e11716a38d3c304e6c5311f Mon Sep 17 00:00:00 2001
From: Jorrit Schaap <schaap@astron.nl>
Date: Fri, 15 Jul 2022 15:44:14 +0200
Subject: [PATCH] TMSS-1912: try to use the fast ujson module, else plain json

---
 SAS/TMSS/client/lib/tmss_http_rest_client.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/SAS/TMSS/client/lib/tmss_http_rest_client.py b/SAS/TMSS/client/lib/tmss_http_rest_client.py
index 491b8055790..b27e93dcf9a 100644
--- a/SAS/TMSS/client/lib/tmss_http_rest_client.py
+++ b/SAS/TMSS/client/lib/tmss_http_rest_client.py
@@ -11,7 +11,11 @@ urllib3.disable_warnings()
 import requests
 from http.client import responses
 import os
-import json
+try:
+    # try to use the fast ujson module, else plain json
+    import ujson as json
+except ImportError:
+    import json
 from datetime import datetime, timedelta
 import html
 from urllib.parse import quote
@@ -785,4 +789,3 @@ class TMSSsession(object):
         Returns the created scheduling_unit_draft/blueprint upon success, or raises.
         Use the method get_trigger_specification_doc_for_scheduling_unit_observing_strategy_template to get a valid trigger json doc, edit it, and sumbit using this method."""
         return self.post_to_path_and_get_result_as_json_object('/submit_trigger', json_data=trigger_doc, retry_count=retry_count)
-
-- 
GitLab