Vielleicht so (Destructor zum Aufräumen des Arrays müsste noch gemacht werden):
Delphi-Quellcode:
interface
uses
REST.Json;
TTranslation = class
private
FtranslatedText: string;
public
property translatedText: string read FtranslatedText write FtranslatedText;
end;
Ttranslations = TArray<TTranslation>;
Tdata = class
private
Ftranslations: TTranslations;
public
property translations: TTranslations read Ftranslations write Ftranslations;
end;
TApi = class
private
Fdata: Tdata;
public
property data: Tdata read Fdata write Fdata;
end;
implementation
var s := TJson.JsonToObject<TApi>('<Dein JSON-String>').data.translations[0].translatedText;