Hi, Is there a reason that this might cause an access violation?
Note: I have changed the object names from TJSON to TdJSON to avoid conflicts with json writers.
function IsValidLicense(const aLicense: string): Boolean;
var
http: TIdHTTP;
jdata: TdJSON;
begin
http := TIdHTTP.Create(nil);
try
jdata.Parse(http.Get('http://qs.quantumsoftware.co.za:7777/rsm/license?key=' + aLicense));
try
Result := jdata['valid'].AsBoolean;
finally
jdata.Free;
end;
finally
http.Free;
end;
end;
This is the json response:
{
"valid": true,
"message": "Product key is valid!"
}
Hi, Is there a reason that this might cause an access violation? Note: I have changed the object names from
TJSON
toTdJSON
to avoid conflicts with json writers.This is the json response: