json object Delphi/꿀팁 JSONArray에서 값 가져오기 var I: Integer; JsonArr: TJSONArray; JsonValue: TJSONValue; begin .. for I := 0 to JsonArr.Count - 1 do begin Memo1.Lines.Add(JsonArr.Get(I).GetValue('Name')); //또는 if not JsonObj.Get(I).TryGetValue('Name', JsonValue) then //가져오려는 Type과 일치 시킨다. Memo1.Lines.Add('Not Found!') else Memo1.Lines.Add(JsonValue.ToString); end; end; Delphi/꿀팁 JSONObject에서 값 가져오기 var JsonObj: TJSONObject; JsonValue: TJSONValue; begin .. ShowMessage(JsonObj.GetValue('Name')); //또는 가져오려는 Type과 일치 if not JsonObj.TryGetValue('Name', JsonValue) then ShowMessage('Not Found!') else ShowMessage(JsonValue.ToString); end; 2020.02.17 - [Delphi/간단하게] - 간단하게 JSON 파싱하기 2020.02.17 - [Delphi/꿀팁] - JSONArray에서 값 가져오기 Delphi/간단하게 간단하게 JSON 파싱하기 uses .., System.JSON; var JsonObj: TJSONObject; JsonString: string; begin JsonString := '{"Key": "Value", "Array":[{".."}]}'; JsonObj := TJSONObject.ParseJSONValue(JsonString) as TJSONObject; .. ShowMessage(JsonObj.GetValue('Key')); end; 2020/02/17 - [Delphi/꿀팁] - JSONArray에서 값 가져오기 2020/02/17 - [Delphi/꿀팁] - JSONObject에서 값 가져오기 이전 1 다음