aboutsummaryrefslogtreecommitdiffstats
path: root/gps-track.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'gps-track.rsc')
-rw-r--r--gps-track.rsc7
1 files changed, 2 insertions, 5 deletions
diff --git a/gps-track.rsc b/gps-track.rsc
index dbca38a..f78dfe7 100644
--- a/gps-track.rsc
+++ b/gps-track.rsc
@@ -33,11 +33,8 @@
:do {
/tool/fetch check-certificate=yes-without-crl $GpsTrackUrl output=none \
http-method=post http-header-field=({ "Content-Type: application/json" }) \
- http-data=("{" . \
- "\"lat\":\"" . ($Gps->"latitude") . "\"," . \
- "\"lon\":\"" . ($Gps->"longitude") . "\"," . \
- "\"identity\":\"" . $Identity . "\"" . \
- "}") as-value;
+ http-data=[ :serialize to=json { "identity"=$Identity; \
+ "lat"=($Gps->"latitude"); "lon"=($Gps->"longitude") } ] as-value;
$LogPrint debug $ScriptName ("Sending GPS data in " . $CoordinateFormat . " format: " . \
"lat: " . ($Gps->"latitude") . " " . \
"lon: " . ($Gps->"longitude"));