RESTDebugger
用这个调用,Copy Components,生成控件,
然后粘贴到工程里。
RESTRequest1.Execute; // send request to endpoint var JSONValue: TJSONValue; var JSONArray: TJSONArray; var ArrayElement: TJSONValue; // after using object we just free them within the Lists RctList := TList<TRectangle>.Create; ImgList := TList<TImage>.Create; LblTitleList := TList<TLabel>.Create; LblDescpList := TList<TLabel>.Create; try JSONValue := TJSONObject.ParseJSONValue(RESTResponse1.Content); JSONArray := JSONValue.GetValue<TJSONArray>('data'); // articles are stored in the data array in the JSON response https://blogs.embarcadero.com/how-to-create-a-cross-platform-news-app-with-delphi/