JSON 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에서 값 가져오기 Delphi/간단하게 간단하게 구조체를 JSON으로 변환하기 uses .., System.JSON.Types, System.JSON.Serializers; with TJsonSerializer.Create do begin try //필요 시 설정 Formatting := TJsonFormatting.Indented; ShowMessage(Serialize(구조체)); finally Free; end; end; 이전 1 2 3 4 다음