I’ve noticed this problem a couple of times when trying to stringify Json string in Basic.
The only workaround I’ve found has been to switch to javascript, here’s a short sample:
Dim JsonGeo={"homeMobileCountryCode": 310, "homeMobileNetworkCode": 410, "radioType": "gsm", "carrier": "Vodafone", "considerIp": "true","cellTowers": [{"cellId": 29315071, "locationAreaCode": 20200, "mobileCountryCode": 228, "mobileNetworkCode": 2, "signalStrength": -68}]}
Dim HEREgsm = {"gsm": [{"mcc": 262,"mnc": 1,"lac": 5126,"cid": 16504, "rxLevel": -75}]}
Function MakeString()
Try
Dim Link = JSON.stringify(JsonGeo)
console.log("JsonGeo: " + Link)
Catch err
console.log("Error with JsonGeo: " + err)
End Try
Try
Dim Link = JSON.stringify(HEREgsm)
console.log("HEREgsm: " + Link)
Catch err
console.log("Error with HEREgsm: " + err)
End Try
JavaScript
var jsonStr=JSON.stringify(JsonGeo);
console.log("JsonGeo: " + jsonStr)
jsonStr=JSON.stringify(HEREgsm);
console.log("HEREgsm: " + jsonStr)
End JavaScript
End Function