procedure TForm1.btnBuildJSONClick(Sender: TObject); var request: TclJSONObject; data: TclJSONObject; job: TclJSONObject; begin request := TclJSONObject.Create(); try data := TclJSONObject.Create(); request.AddMember('data', data); job := TclJSONObject.Create(); data.AddMember('job', job); job.AddString('reference_id', 'ID32048'); job.AddString('status_code', '10'); job.AddString('status_name', 'New Job'); ShowMessage(request.GetJSONString()); finally request.Free(); end; end;
procedure TForm1.btnParseJSONClick(Sender: TObject); var request: TclJSONObject; data: TclJSONObject; job: TclJSONObject; begin request := TclJSONObject.ParseObject(Memo1.Lines.Text); try data := request.ObjectByName('data'); job := data.ObjectByName('job'); ShowMessage(job.ValueByName('reference_id')); finally request.Free(); end; end;
Trouble logging in? Simply enter your email address OR username in order to reset your password.
For faster and more reliable delivery, add admin@clevercomponents.com to your trusted senders list in your email software.