You are not logged in.
Pages: 1
Thanks a lot for your help with this. The TDocVariantData works fine & i can do everything i need to now.Cheers.
Sorry like i say i'm very new to all this. Don't really understand what you meant by late binding. I've now realised i can access the fields in the above way but they just don't show in the debug window for the reason shown.
Hi thanks for the reply. The way you've described it above is how i expected it to work but when i did oVariant.AgencyId is just showed as a value of variant in the debug window not the actual value of the the agencyID.
I've put in this code which i think is what admin was suggesting:
TDocVariant.New(oVariant) ;
oVariant:= _JsonFast(sResponseBody);
& this to seems to work ok now.
Yeh i very new to all this so i am a bit confused. So are you saying i need convert my variant type to a TDocVariant before i can access it?
Thanks for quick reply. If i look at oVariant in debugger it just looks the same as the input string. If i do oVariant.AgencyID the result it shows is Variant
Hi, I'm very new to all this & am probably making an obvious mistake but i can't get the _JSON function to work correctly
I'm doing this in delphi 2007:
var oVariant:Variant;
sResponseBody:string
sResponseBody:='{"AgencyId":"ADAM002 ","AgencyName":"Adams agency4 ","SqlUserName":null,"SqlPassWord":null,"Status":"A","Payslips":true,"AWR":true,"Ledger":false,"Timesheets":true,"FromEmail":"","Bespoke":null,"AgencyEmail":"adam@agency.com","ReplyEmail":" ","UserHash":null}'
oVariant:= _JsonFast(fResponseBody);
It doesn't crash but the oVariant just contains the unparsed JSON not the variant representation of it as i'd expect.
Can anyone see what i doing wrong here? Any help would be very much appreciated.
Pages: 1