I’m having a nightmare with JSONitem…
According to the documentation, this should work
[code] dim j as new JSONItem
j.value(“Command”)=“2”
j.value(“email”)=TextField1.text.Trim
j.value(“Username”)=TextField2.text.trim
j.value(“Date”)=d
j.value(“Code”)=a
dim s as string=j.ToString
commsocket.write(s)
Commsocket.flush[/code]
this cause it the app to stop and have a problem with dim s as string=j.ToString
s="", I then looked at the J variable and that made no sense…
Then I tried
[code]dim js as Dictionary
js=new Dictionary
js.value(“Command”)=“2”
js.value(“email”)=TextField1.text.Trim
js.value(“Username”)=TextField2.text.trim
js.value(“Date”)=d
js.value(“Code”)=a
j = new JSONItem
j=js
dim s as string=j.ToString
commsocket.write(s)
Commsocket.flush[/code]
I could see the JS dictionary - that looked all good…
Crashed again on the dim s as string=j.tostring
What am I doing wrong? … I’m using 2014r1 for windows - don’t tell me I need the latest version i have it and It took forever converting the Mac version to work for 64 bit.