NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: AtoB on February 24, 2016, 05:38:55 AM
-
Hi all,
I've the following json string :
{"FTP" : {"srv" : "test.test.nl","prt" : "","usr" : "username","pwd" : "wachtwoord","pas" : 1}}
which I want to read into the following group structure
FTPGroup GROUP,PRE(FTP)
srv STRING(250)
prt STRING(20)
usr STRING(250)
pwd STRING(250)
pas BYTE
END
with the following code :
lSt_JSON.SetValue(CLIP(EMESS:sendto))
lJSON_FTP.TagCase = jF:CaseLower
lJSON_FTP.Load(FTPGroup, lSt_JSON, 'FTP')
but the parser somehow treats the "test.test.nl" value as a numeric as it comes up with the following error :
ErrorTrap: "Unexpected literal (.) at position 24 v" : "test.test.nl"
this is the first time I'm using jFiles as a parser, so I might be doing something wrong of course, but I haven't got a clue !
-
Hi Ton,
done a test here, but it seems to be ok. Which build of jFiles are you using?
cheers
Bruce
-
Hi Bruce,
solved (or actually problem went away!): I was using this in a c6.3 context (which I wasn't aware of aparently, otherwise I would have mentioned or tested it in c10 first ...) and I think I messed up the jFilesLinkMode and jFilesDllMode somehow (although most of the time it results in gpfs ...). Anyway it's working as expected now!
Thanks for looking at it and really sorry for the inconvenience ...
regards,
Ton