diff --git a/apps/routes/cutouts/utils.py b/apps/routes/cutouts/utils.py index 04a57ae..c70b9ba 100644 --- a/apps/routes/cutouts/utils.py +++ b/apps/routes/cutouts/utils.py @@ -91,7 +91,7 @@ def format_and_send_cutout(payload: dict): group_alerts=False, truncated=True, extract_color=False, - escape_slash=True, + escape_slash=False, ) json_payload = {} diff --git a/apps/utils/decoding.py b/apps/utils/decoding.py index bc50b27..e1d1fab 100644 --- a/apps/utils/decoding.py +++ b/apps/utils/decoding.py @@ -150,13 +150,13 @@ def format_hbase_output( def hbase_to_dict(hbase_output, escape_slash=False): """Optimize hbase output TreeMap for faster conversion to DataFrame""" gateway = JavaGateway(auto_convert=True) - JSONObject = gateway.jvm.org.json.JSONObject + GSONObject = gateway.jvm.com.google.gson.Gson # We do bulk export to JSON on Java side to avoid overheads of iterative access # and then parse it back to Dict in Python if escape_slash: hbase_output = str(hbase_output) - optimized = json.loads(JSONObject(hbase_output).toString()) + optimized = json.loads(GSONObject().toJson(hbase_output)) return optimized diff --git a/install/README.md b/install/README.md index 7bc779f..988d3bd 100644 --- a/install/README.md +++ b/install/README.md @@ -35,7 +35,7 @@ User=almalinux Group=almalinux WorkingDirectory=/home/almalinux/fink-object-api/bin -ExecStart=/bin/sh -c 'source /home/almalinux/.bashrc; exec java -cp "Lomikel-03.04.00x-HBase.exe.jar:py4j0.10.9.7.jar" com.Lomikel.Py4J.LomikelGatewayServer 2>&1 >> /tmp/fink_gateway.out' +ExecStart=/bin/sh -c 'source /home/almalinux/.bashrc; exec java -cp "Lomikel-03.04.00x-HBase.exe.jar:py4j0.10.9.7.jar:gson-2.11.0.jar" com.Lomikel.Py4J.LomikelGatewayServer 2>&1 >> /tmp/fink_gateway.out' [Install] WantedBy=multi-user.target