skip to Main Content

Is there a convenient way to create nested JSON in Delphi?

I'm creating a nested JSON object in Delphi using this code: var jo:TJsonObject; try jo := TJsonObject.Create; jo.AddPair('data', TJsonObject.Create); with jo.GetValue<TJsonObject>('data') do begin jo.AddPair('details', TJSONObject.Create); with jo.GetValue<TJsonObject>('details') do begin jo.AddPair('foo', 'bar'); end; end; finally FreeAndNil(jo); end; It works and produces…

VIEW QUESTION

Css – How to make TWebPanel have rounded corners?

I'm trying to get this done on TMS Web Core via Delphi code using. procedure TForm1.WebFormCreate(Sender: TObject); begin pnlPersonalInfo.Margins.Left := 15; pnlPersonalInfo.Margins.Top := 15; pnlPersonalInfo.Margins.Right := 15; pnlPersonalInfo.Margins.Bottom := 15; phone.HTML.Text := GetBootstrapIcon('telephone-fill', 24, '#576A33'); email.HTML.Text := GetBootstrapIcon('envelope-fill', 24, '#576A33');…

VIEW QUESTION

Can Delphi 10.1 extract a JSON value into multiple categories?

I have extracted the UK Gov Bank Holidays using Delphi 10.1 with TRESTClient and TRESTRequest. This is the results (cut down version): { "england-and-wales": {"division":"england-and-wales","events": [{"title":"New Year’s Day","date":"2018-01-01","notes":"","bunting":true}, {"title":"Good Friday","date":"2018-03-30","notes":"","bunting":false}, {"title":"Christmas Day","date":"2025-12-25","notes":"","bunting":true}, {"title":"Boxing Day","date":"2025-12-26","notes":"","bunting":true}]}, "scotland": {"division":"scotland","events": [{"title":"New Year’s Day","date":"2018-01-01","notes":"","bunting":true}, {"title":"2nd…

VIEW QUESTION
Back To Top
Search