Using DataSetAdapter.Get #96
-
Hi Mr. Sanchez I begin to use RESTRequest4Delphi and I want to now which property to setup to use GET with DataSetAdapter with the following JSon from a third party Application. I only need the "r" field to fill the dataset. Thanks, { |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You will have to get the JSON manually. And load into your dataset. JSON automatically loads the first level just... a, r, s, e, m. You can also create a Master Detail DataSet. Then it would work... but the simplest way would be to get the JSON manually and load only what you need. uses RESTRequest4Delphi, DataSet.Serialize;
var
LResponse: IResponse;
begin
LResponse := TRequest.New.BaseURL('').Get;
if LResponse.StatusCode = 200 then
DataSet.LoadFromJSON(LResponse.JSONValue.GetValue<TJSONArray>('r')); |
Beta Was this translation helpful? Give feedback.
You will have to get the JSON manually. And load into your dataset. JSON automatically loads the first level just... a, r, s, e, m. You can also create a Master Detail DataSet. Then it would work... but the simplest way would be to get the JSON manually and load only what you need.