TransWikia.com

Как прочитать JSON в Delphi?

Stack Overflow на русском Asked by Supply on December 9, 2021

Использую библиотеку System.JSON. Пробую вот так:

buf:=TFile.ReadAllText(Dir + SR.Name);
JSONValue := TJSONObject.ParseJSONValue(buf);
try
  if JSONValue is TJSONArray then
  begin
    for jv in TJSONArray(JSONValue) do
    begin
      showmessage(jv.GetValue<string>('Name'));
    end;
  end;
finally
  JSONValue.Free;
end;

JSONValue в итоге пустой.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP