<?xml version="1.0" encoding="iso-8859-9" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Clomosy | Forum : JsonArray kullanımı</title>
  <link>https://forum.clomosy.com.tr/</link>
  <description><![CDATA[XML içerik linki; Clomosy | Forum : Clomosy ile de&#287;i&#351;ken kullan&#305;m&#305; : JsonArray kullanımı]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 15 Apr 2026 04:43:50 +0000</pubDate>
  <lastBuildDate>Mon, 17 Nov 2025 18:21:24 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.07</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://forum.clomosy.com.tr/RSS_post_feed.asp?TID=1227</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Clomosy | Forum]]></title>
   <url>https://forum.clomosy.com.tr/forum_images/logo.png</url>
   <link>https://forum.clomosy.com.tr/</link>
  </image>
  <item>
   <title><![CDATA[JsonArray kullanımı : Her d&#246;ng&#252; de yeni Item olu&#351;turup...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=1227&amp;PID=2709#2709</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=257">Emr.Erkmn</a><br /><strong>Konu:</strong> 1227<br /><strong>Gönderim Zamanı:</strong> 17&nbsp;Kasım&nbsp;2025 Saat 18:21<br /><br /><div>Her döngü de&nbsp; yeni Item oluşturup deneyelim&nbsp;<br><br>function SetUpdateBodyV: String</div><div>var</div><div>&nbsp; Order: TCLJSONObject;</div><div>&nbsp; Items: TCLJSONArray;</div><div>&nbsp; Item: TCLJSONObject;</div><div>&nbsp; LPieceStr: String;</div><div>&nbsp; LItemID: String;</div><div>&nbsp; ChangeBtn: TClProButton;</div><div>&nbsp; TempItemJson: String;</div><div>&nbsp; FArr: TCLJSONArray;</div><div>&nbsp; I: Integer;</div><div>&nbsp; TempPieceLbl: TclProLabel;</div><div>&nbsp; ItemAmount: Integer;</div><div>&nbsp; ItemIDInt: Integer;</div><div>{</div><div>&nbsp; Try</div><div>&nbsp; &nbsp; Order = TCLJSONObject.Create;</div><div>&nbsp; &nbsp; Order.AddPair('note', TCLJSONValue.Str(noteMemo.Text));</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; ChangeBtn = TClProButton(MainForm.ClSender);</div><div>&nbsp; &nbsp; if (ChangeBtn &lt;&gt; nil)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; Order.AddPair('status', TCLJSONValue.Str(ChangeBtn.ClTagStr));</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; Items = TCLJSONArray.Create;</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; TempItemJson = Clomosy.CLParseJSON(JsonResponse, 'items');</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; if (TempItemJson == '')</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; Order.AddArray('items', Items);</div><div>&nbsp; &nbsp; &nbsp; Result = Order.ToJSONString;</div><div>&nbsp; &nbsp; &nbsp; Items.Free;</div><div>&nbsp; &nbsp; &nbsp; Order.Free;</div><div>&nbsp; &nbsp; &nbsp; Exit;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; FArr = TCLJSONArray.Create;</div><div>&nbsp; &nbsp; FArr = TCLJSONArray.CreateFromJSON(TempItemJson);</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; if ((FArr == nil) || (FArr.Count == 0))</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; Order.AddArray('items', Items);</div><div>&nbsp; &nbsp; &nbsp; Result = Order.ToJSONString;</div><div>&nbsp; &nbsp; &nbsp; Items.Free;</div><div>&nbsp; &nbsp; &nbsp; Order.Free;</div><div>&nbsp; &nbsp; &nbsp; if (FArr &lt;&gt; nil)</div><div>&nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; FArr.Free;</div><div>&nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; Exit;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; for (I = 0 to FArr.Count - 1)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; Try</div><div>&nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; LItemID = Clomosy.CLParseJSON(TempItemJson, IntToStr(I) + '.item_id');</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; LPieceStr = '';</div><div>&nbsp; &nbsp; &nbsp; &nbsp; TempPieceLbl = MainForm.clFindComponent('PieceLbl' + IntToStr(I)) as TclProLabel;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if (TempPieceLbl &lt;&gt; nil)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LPieceStr = TempPieceLbl.Text;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (Length(LPieceStr) &gt; 0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Delete(LPieceStr, 1, 1);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ItemAmount = 0;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ItemIDInt = 0;</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Try</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (LPieceStr &lt;&gt; '')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ItemAmount = StrToInt(LPieceStr);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; except</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ShowMessage('Amount geçersiz (Index ' + IntToStr(I) + '): ' + LPieceStr);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Continue;&nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Try</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (LItemID &lt;&gt; '')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ItemIDInt = StrToInt(LItemID);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; except</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ShowMessage(' Item ID geçersiz (Index ' + IntToStr(I) + '): ' + LItemID);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Continue;&nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if ((ItemAmount &gt; 0) &amp;&amp; (ItemIDInt &gt; 0))</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item = TCLJSONObject.Create;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item.AddPair('item_id', TCLJSONValue.Str(LItemID));</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Item.AddPair('amount', TCLJSONValue.Str(LPieceStr));</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Items.Add(Item);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ShowMessage(' Item eklendi: item_id=' + LItemID + ', amount=' + LPieceStr);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ShowMessage('&#65039; UYARI: Geçersiz değerler (Index ' + IntToStr(I) + '): ItemID=' + LItemID + ', Amount=' + LPieceStr);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; except</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ShowMessage(' Item ekleme hatası (Index ' + IntToStr(I) + '): ' + LastExceptionMessage);</div><div>&nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; Order.AddArray('items', Items);</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; Clomosy.SetClipboard(Order.ToJSONString);</div><div>&nbsp; &nbsp; ShowMessage(' SetUpdateBodyV OUTPUT: ' + Order.ToJSONString);</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; Result = Order.ToJSONString;</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; if (FArr &lt;&gt; nil)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; FArr.Free;</div><div>&nbsp; &nbsp; &nbsp; FArr = nil;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; }</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage(' SetUpdateBodyV hatası: ' + LastExceptionMessage);</div><div>&nbsp; &nbsp; Result = '';</div><div>&nbsp; }</div><div>}</div><a href="https://static.cloudflareinsights.com/beac&#111;n.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" target="_blank" rel="nofollow">https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015"</a> integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon="{&quot;version&quot;:&quot;2024.11.0&quot;,&quot;token&quot;:&quot;439455f3e46c40b98dbd42a2f1a954d8&quot;,&quot;r&quot;:1,&quot;server_timing&quot;:{&quot;name&quot;:{&quot;cfCacheStatus&quot;:true,&quot;cfEdge&quot;:true,&quot;cfExtPri&quot;:true,&quot;cfL4&quot;:true,&quot;cfOrigin&quot;:true,&quot;cfSpeedBrain&quot;:true},&quot;location_startswith&quot;:null}}" crossorigin="anonymous">]]>
   </description>
   <pubDate>Mon, 17 Nov 2025 18:21:24 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=1227&amp;PID=2709#2709</guid>
  </item> 
  <item>
   <title><![CDATA[JsonArray kullanımı : function SetUpdateBodyV: StringvarOrder,...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=1227&amp;PID=2703#2703</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=344">M-Guney</a><br /><strong>Konu:</strong> 1227<br /><strong>Gönderim Zamanı:</strong> 17&nbsp;Kasım&nbsp;2025 Saat 13:19<br /><br /><div>function SetUpdateBodyV: String</div><div>var</div><div>Order, Items: TCLJSONObject;</div><div>LPieceStr, LItemID : String;</div><div>ChangeBtn : TClProButton;</div><div>TempItemJson : String;</div><div>FArr : TCLJSONArray;</div><div>Item : TClProObject;</div><div>I : Integer;</div><div>TempPieceLbl : TclProLabel;</div><div>{</div><div>&nbsp; Try</div><div>&nbsp; Order = TCLJSONObject.Create;</div><div>&nbsp; Order.AddPair('note', TCLJSONValue.Str(noteMemo.Text));</div><div>&nbsp;&nbsp;</div><div>&nbsp; ChangeBtn = TClProButton(MainForm.Clsender);</div><div>&nbsp; if (ChangeBtn &lt;&gt; nil)</div><div>&nbsp; {</div><div>&nbsp; &nbsp; Order.AddPair('status', TCLJSONValue.Str(ChangeBtn.ClTagStr));</div><div>&nbsp; }</div><div>&nbsp;&nbsp;</div><div>&nbsp;&nbsp;</div><div>&nbsp; Items = TCLJSONArray.Create; // items{ item_id&nbsp; &nbsp; amount}</div><div>&nbsp; Item = TCLJSONObject.Create;</div><div>&nbsp; TempItemJson = Clomosy.CLParseJSON(JsonResponse, 'items'); // for taking item_id</div><div>&nbsp; FArr = TCLJSONArray.CreateFromJSON(TempItemJson);</div><div>&nbsp; for (I=0 to FArr.Count -1){</div><div>&nbsp; &nbsp; LItemID = Clomosy.CLParseJSON(TempItemJson, IntToStr(I) + '.item_id') // item_id is ready</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; TempPieceLbl = MainForm.clFindComponent('PieceLbl' + IntToStr(I)); // for taking amount</div><div>&nbsp; &nbsp; if (TempPieceLbl &lt;&gt; nil)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; LPieceStr = TempPieceLbl.Text;</div><div>&nbsp; &nbsp; &nbsp; Delete(LPieceStr, 1, 1);&nbsp;</div><div>&nbsp; &nbsp; } // amount is ready</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; if((StrToInt(LPieceStr) &lt;&gt;nil)&amp;&amp;(StrToInt(LItemID) &lt;&gt;nil)){</div><div>&nbsp; &nbsp; &nbsp; Item.AddPair('item_id', TCLJSONValue.Str(LItemID));</div><div>&nbsp; &nbsp; &nbsp; Item.AddPair('amount', TCLJSONValue.Str(LPieceStr));</div><div>&nbsp; &nbsp; &nbsp; Items.AddObject('items',Item);</div><div>&nbsp; &nbsp; &nbsp; ShowMessage(Item.ToJSONString+'added')</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; }</div><div><br></div><div>&nbsp;&nbsp;</div><div>&nbsp; Order.AddArray('items', Items);</div><div>&nbsp; Clomosy.SetClipboard(Order.ToJSONString);</div><div>&nbsp; ShowMessage('SetUpdateBodyV OUTPUT: '+Order.ToJSONString);</div><div>&nbsp;&nbsp;</div><div>&nbsp; Result = Order.ToJSONString;</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage('CalculateTotalPrice hatası: ' + LastExceptionMessage);</div><div>&nbsp; }</div><div>}<br><br>Bu şekilde bir yol izledim yapmak için obje, array, obje şeklinde iç içe bir yapı kurguladım fakat arraya eklemek istediğim objeti eklemiyor.</div><a href="https://static.cloudflareinsights.com/beac&#111;n.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" target="_blank" rel="nofollow">https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015"</a> integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon="{&quot;version&quot;:&quot;2024.11.0&quot;,&quot;token&quot;:&quot;439455f3e46c40b98dbd42a2f1a954d8&quot;,&quot;r&quot;:1,&quot;server_timing&quot;:{&quot;name&quot;:{&quot;cfCacheStatus&quot;:true,&quot;cfEdge&quot;:true,&quot;cfExtPri&quot;:true,&quot;cfL4&quot;:true,&quot;cfOrigin&quot;:true,&quot;cfSpeedBrain&quot;:true},&quot;location_startswith&quot;:null}}" crossorigin="anonymous">]]>
   </description>
   <pubDate>Mon, 17 Nov 2025 13:19:55 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=1227&amp;PID=2703#2703</guid>
  </item> 
  <item>
   <title><![CDATA[JsonArray kullanımı : {&amp;#034;note&amp;#034;:&amp;#034;no pot...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=1227&amp;PID=2702#2702</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=344">M-Guney</a><br /><strong>Konu:</strong> 1227<br /><strong>Gönderim Zamanı:</strong> 17&nbsp;Kasım&nbsp;2025 Saat 11:59<br /><br />{"note":"no potato","status":"Served","items":{"item_id":"2","amount":"29"}}<br>Body yi bu şekilde yolluyorum fakat aslında&nbsp;<br>{"note":"no potato","status":"Served",<br>"items": &#091;<div>&nbsp; { "item_id": "2", "amount": "2" },</div><div>&nbsp; { "item_id": "7", "amount": "1" }</div><div>&#093;</div>}&nbsp;<br>bu şekilde yollamam gerekiyor nasıl yapabilirim.<br><br><div>function SetUpdateBodyV: String</div><div>var</div><div>Order, Items: TCLJSONObject;</div><div>LPieceStr, LItemID : String;</div><div>ChangeBtn : TClProButton;</div><div>TempItemJson : String;</div><div>FArr : TCLJSONArray;</div><div>I : Integer;</div><div>TempPieceLbl : TclProLabel;</div><div>{</div><div>&nbsp; Try</div><div>&nbsp; Order = TCLJSONObject.Create;</div><div>&nbsp; Order.AddPair('note', TCLJSONValue.Str(noteMemo.Text));</div><div>&nbsp;&nbsp;</div><div>&nbsp; ChangeBtn = TClProButton(MainForm.Clsender);</div><div>&nbsp; if (ChangeBtn &lt;&gt; nil)</div><div>&nbsp; {</div><div>&nbsp; &nbsp; Order.AddPair('status', TCLJSONValue.Str(ChangeBtn.ClTagStr));</div><div>&nbsp; }</div><div>&nbsp;&nbsp;</div><div>&nbsp;&nbsp;</div><div>&nbsp; Items = TCLJSONObject.Create; // items{ item_id&nbsp; &nbsp; amount}</div><div>&nbsp; TempItemJson = Clomosy.CLParseJSON(JsonResponse, 'items'); // for taking item_id</div><div>&nbsp; FArr = TCLJSONArray.CreateFromJSON(TempItemJson);</div><div>&nbsp; for (I=0 to FArr.Count -1){</div><div>&nbsp; &nbsp; LItemID = Clomosy.CLParseJSON(TempItemJson, IntToStr(I) + '.item_id') // item_id is ready</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; TempPieceLbl = MainForm.clFindComponent('PieceLbl' + IntToStr(I)); // for taking amount</div><div>&nbsp; &nbsp; if (TempPieceLbl &lt;&gt; nil)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; LPieceStr = TempPieceLbl.Text;</div><div>&nbsp; &nbsp; &nbsp; Delete(LPieceStr, 1, 1);&nbsp;</div><div>&nbsp; &nbsp; } // amount is ready</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; if((StrToInt(LPieceStr) &lt;&gt;nil)&amp;&amp;(StrToInt(LItemID) &lt;&gt;nil)){</div><div>&nbsp; &nbsp; &nbsp; Items.AddPair('item_id', TCLJSONValue.Str(LItemID));</div><div>&nbsp; &nbsp; &nbsp; Items.AddPair('amount', TCLJSONValue.Str(LPieceStr));</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; }</div><div><br></div><div>&nbsp;&nbsp;</div><div>&nbsp; Order.AddArray('items', Items);</div><div>&nbsp; Clomosy.SetClipboard(Order.ToJSONString);</div><div>&nbsp; ShowMessage('SetUpdateBodyV OUTPUT: '+Order.ToJSONString);</div><div>&nbsp;&nbsp;</div><div>&nbsp; Result = Order.ToJSONString;</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage('CalculateTotalPrice hatası: ' + LastExceptionMessage);</div><div>&nbsp; }</div><div>}</div><a href="https://static.cloudflareinsights.com/beac&#111;n.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" target="_blank" rel="nofollow">https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015"</a> integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon="{&quot;version&quot;:&quot;2024.11.0&quot;,&quot;token&quot;:&quot;439455f3e46c40b98dbd42a2f1a954d8&quot;,&quot;r&quot;:1,&quot;server_timing&quot;:{&quot;name&quot;:{&quot;cfCacheStatus&quot;:true,&quot;cfEdge&quot;:true,&quot;cfExtPri&quot;:true,&quot;cfL4&quot;:true,&quot;cfOrigin&quot;:true,&quot;cfSpeedBrain&quot;:true},&quot;location_startswith&quot;:null}}" crossorigin="anonymous">]]>
   </description>
   <pubDate>Mon, 17 Nov 2025 11:59:24 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=1227&amp;PID=2702#2702</guid>
  </item> 
  <item>
   <title><![CDATA[JsonArray kullanımı : void GetOrderDetailsCompletedV(Sender)var...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=1227&amp;PID=2699#2699</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=257">Emr.Erkmn</a><br /><strong>Konu:</strong> 1227<br /><strong>Gönderim Zamanı:</strong> 13&nbsp;Kasım&nbsp;2025 Saat 17:55<br /><br /><div>void GetOrderDetailsCompletedV(Sender)</div><div>var</div><div>&nbsp; restObj: TCLRest;</div><div>&nbsp; responseLength: Integer;</div><div>&nbsp; itemsJson: String;</div><div>&nbsp; i: Integer;</div><div>&nbsp; itemName: String;</div><div>{</div><div>&nbsp; Try</div><div>&nbsp; &nbsp; restObj = TCLRest(Sender);</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; if (restObj == nil)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; ShowMessage('Sender nil Response alınamadı');</div><div>&nbsp; &nbsp; &nbsp; Exit;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; JsonResponse = restObj.Response;</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; responseLength = Length(JsonResponse);</div><div>&nbsp; &nbsp; if (responseLength == 0)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; ShowMessage('UYARI: Response boş ');</div><div>&nbsp; &nbsp; &nbsp; Exit;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; FQry = Clomosy.ClDataSetFromJSON(JsonResponse);</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; itemsJson = Clomosy.CLParseJSON(JsonResponse, 'items');</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; if (itemsJson == '')</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; ShowMessage('UYARI: Items array bulunamadı');</div><div>&nbsp; &nbsp; &nbsp; Exit;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; Arr = TCLJSONArray.Create;</div><div>&nbsp; &nbsp; Arr = TCLJSONArray.CreateFromJSON(itemsJson);</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; if ((Arr == nil) || (Arr.Count == 0))</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; ShowMessage('UYARI: Items array boş');</div><div>&nbsp; &nbsp; &nbsp; if (Arr &lt;&gt; nil)</div><div>&nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Arr.Free;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Arr = nil;</div><div>&nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; Exit;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; for (i = 0 to Arr.Count - 1)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; itemName = Clomosy.CLParseJSON(itemsJson, IntToStr(i) + '.item_name');</div><div>&nbsp; &nbsp; &nbsp; ShowMessage('Item ' + IntToStr(i) + ': ' + itemName);</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; noteMemo.Text = Clomosy.CLParseJSON(JsonResponse, 'note');</div><div>&nbsp; &nbsp; AmountValueLbl.Text = Clomosy.CLParseJSON(JsonResponse, 'grand_total') + 'TL';</div><div>&nbsp; &nbsp; DisplayArrivalTime.Text = Clomosy.CLParseJSON(JsonResponse, 'order_time');</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; DetailsPnlV(FQry);</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; if (Arr &lt;&gt; nil)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; Arr.Free;</div><div>&nbsp; &nbsp; &nbsp; Arr = nil;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; if (FQry &lt;&gt; nil)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; FQry.Free;</div><div>&nbsp; &nbsp; &nbsp; FQry = nil;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage('GetOrderDetailsCompletedV hatası: ' + LastExceptionMessage);</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; if (Arr &lt;&gt; nil)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; Arr.Free;</div><div>&nbsp; &nbsp; &nbsp; Arr = nil;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; if (FQry &lt;&gt; nil)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; FQry.Free;</div><div>&nbsp; &nbsp; &nbsp; FQry = nil;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; }</div><div>}</div><a href="https://static.cloudflareinsights.com/beac&#111;n.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" target="_blank" rel="nofollow">https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015"</a> integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon="{&quot;version&quot;:&quot;2024.11.0&quot;,&quot;token&quot;:&quot;439455f3e46c40b98dbd42a2f1a954d8&quot;,&quot;r&quot;:1,&quot;server_timing&quot;:{&quot;name&quot;:{&quot;cfCacheStatus&quot;:true,&quot;cfEdge&quot;:true,&quot;cfExtPri&quot;:true,&quot;cfL4&quot;:true,&quot;cfOrigin&quot;:true,&quot;cfSpeedBrain&quot;:true},&quot;location_startswith&quot;:null}}" crossorigin="anonymous">]]>
   </description>
   <pubDate>Thu, 13 Nov 2025 17:55:42 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=1227&amp;PID=2699#2699</guid>
  </item> 
  <item>
   <title><![CDATA[JsonArray kullanımı : void GetItemsFromJSONvar jsonString:...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=1227&amp;PID=2698#2698</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=257">Emr.Erkmn</a><br /><strong>Konu:</strong> 1227<br /><strong>Gönderim Zamanı:</strong> 13&nbsp;Kasım&nbsp;2025 Saat 17:52<br /><br /><div>void GetItemsFromJSON</div><div>var</div><div>&nbsp; jsonString: String;</div><div>&nbsp; itemsJson: String;</div><div>&nbsp; i: Integer;</div><div>&nbsp; itemName: String;</div><div>{</div><div>&nbsp; Try</div><div>&nbsp; &nbsp; jsonString = '{"order_id": 30,"table_name": "K12","order_time": "17:57&nbsp; &nbsp; 13.11.2025","status": "Pending","note": "Please make one of the kebabs extra spicy.","grand_total": 398,"items": &#091;{"item_id": 2,"item_name": "kebap","amount": 2,"unit_price": 123,"total_price": 246},{"item_id": 4,"item_name": "Izgara piliç","amount": 1,"unit_price": 76,"total_price": 76},{"item_id": 7,"item_name": "Izgara kanat","amount": 1,"unit_price": 76,"total_price": 76}&#093;}';</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; // yöntem: CLParseJSON ile items array'ini al</div><div>&nbsp; &nbsp; itemsJson = Clomosy.CLParseJSON(jsonString, 'items');</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; if (itemsJson &lt;&gt; '')</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; ItemsArr = TCLJSONArray.Create;</div><div>&nbsp; &nbsp; &nbsp; ItemsArr = TCLJSONArray.CreateFromJSON(itemsJson);</div><div>&nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; ShowMessage('Items Array Count: ' + IntToStr(ItemsArr.Count));</div><div>&nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; for (i = 0 to ItemsArr.Count - 1)</div><div>&nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; itemName = Clomosy.CLParseJSON(itemsJson, IntToStr(i) + '.item_name');</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ShowMessage('Item ' + IntToStr(i) + ': ' + itemName);</div><div>&nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; ItemsArr.Free;</div><div>&nbsp; &nbsp; &nbsp; ItemsArr = nil;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage('GetItemsFromJSON hatası: ' + LastExceptionMessage);</div><div>&nbsp; }</div><div>}</div><a href="https://static.cloudflareinsights.com/beac&#111;n.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" target="_blank" rel="nofollow">https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015"</a> integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon="{&quot;version&quot;:&quot;2024.11.0&quot;,&quot;token&quot;:&quot;439455f3e46c40b98dbd42a2f1a954d8&quot;,&quot;r&quot;:1,&quot;server_timing&quot;:{&quot;name&quot;:{&quot;cfCacheStatus&quot;:true,&quot;cfEdge&quot;:true,&quot;cfExtPri&quot;:true,&quot;cfL4&quot;:true,&quot;cfOrigin&quot;:true,&quot;cfSpeedBrain&quot;:true},&quot;location_startswith&quot;:null}}" crossorigin="anonymous">]]>
   </description>
   <pubDate>Thu, 13 Nov 2025 17:52:49 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=1227&amp;PID=2698#2698</guid>
  </item> 
  <item>
   <title><![CDATA[JsonArray kullanımı : Burada bulunan jsondaki itemname...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=1227&amp;PID=2696#2696</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=344">M-Guney</a><br /><strong>Konu:</strong> 1227<br /><strong>Gönderim Zamanı:</strong> 13&nbsp;Kasım&nbsp;2025 Saat 17:44<br /><br />Burada bulunan jsondaki itemname i almak istiyorum ve jsonarraya json ile atama yapmak istiyorum.<br><br>Örnek olarak çalıştıramadığım kod<br><br><div>var</div><div>&nbsp; Arr : TCLJSONArray;</div><div>{</div><div>Arr = TCLJSONArray.Create;</div><div>Arr = TCLJSONArray.CreateFromJSON('{"order_id": 30,"table_name": "K12","order_time": "17:57&nbsp; &nbsp; 13.11.2025","status": "Pending","note": "Please make one of the kebabs extra spicy.","grand_total": 398,"items": &#091;{"item_id": 2,"item_name": "kebap","amount": 2,"unit_price": 123,"total_price": 246},{"item_id": 4,"item_name": "Izgara piliç","amount": 1,"unit_price": 76,"total_price": 76},{"item_id": 7,"item_name": "Izgara kanat","amount": 1,"unit_price": 76,"total_price": 76}&#093;}');</div><div><br></div><div><br></div><div>ShowMessage(Arr.ToJSONString);</div><div>&nbsp;&nbsp;</div><div>}<br><br><br>Asıl yapmak istediğim ise Burada invalid type cast hatasını gidermek istiyorum.<br><br><div>void GetOrderDetailsCompletedV(Sender)</div><div>var</div><div>&nbsp; Arr : TCLJSONArray;</div><div>&nbsp; restObj: TCLRest;</div><div>&nbsp; responseLength: Integer;</div><div>&nbsp; FQry: TCLJSONQuery;</div><div>{</div><div>&nbsp; Try</div><div>&nbsp;&nbsp;</div><div>&nbsp; &nbsp; restObj = TCLRest(Sender);</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; if (restObj == nil)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; ShowMessage(' HATA: Sender nil! Response alınamadı!');</div><div>&nbsp; &nbsp; &nbsp; Exit;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; JsonResponse = restObj.Response;</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; responseLength = Length(JsonResponse);</div><div>&nbsp; &nbsp; if (responseLength == 0)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; ShowMessage('&#65039; UYARI: Response boş! (0 karakter)');</div><div>&nbsp; &nbsp; &nbsp; ShowMessage('query is Served (boş response)');</div><div>&nbsp; &nbsp; &nbsp; Exit;&nbsp;&nbsp;</div><div>&nbsp; &nbsp; }/*</div><div>&nbsp; &nbsp; If (responseLength &gt; 50){</div><div>&nbsp; &nbsp; &nbsp; &nbsp;jsonOutput = Copy(JsonResponse, 1, 50) + '...' + JsonResponse;</div><div>&nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp; ShowMessage(' restObj Response: ' + jsonOutput);*/</div><div>&nbsp; &nbsp; FQry = TCLJSONQuery.Create(nil);&nbsp;</div><div>&nbsp; &nbsp; FQry = Clomosy.ClDataSetFromJSON(JsonResponse);</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; Arr = TCLJSONArray.Create;</div><div>&nbsp; &nbsp; Try</div><div>&nbsp; &nbsp; &nbsp; Arr = TCLJSONArray.CreateFromJSON(JsonResponse);</div><div>&nbsp; &nbsp; &nbsp; ShowMessage(JsonResponse);</div><div>&nbsp; &nbsp; &nbsp; ShowMessage(Arr.ToJSONString);</div><div>&nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; if ((Arr == nil) || (Arr.Count == 0))</div><div>&nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ShowMessage('JSON Array boş!');</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ShowMessage('query is Served (boş array)');</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Exit;</div><div>&nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; noteMemo.Text = Clomosy.CLParseJSON(JsonResponse, '0.note');</div><div>&nbsp; &nbsp; &nbsp; AmountValueLbl.Text = Clomosy.CLParseJSON(JsonResponse, '0.grand_total') + 'TL';</div><div>&nbsp; &nbsp; &nbsp; DisplayArrivalTime.Text = Clomosy.CLParseJSON(JsonResponse, '0.order_time');</div><div>&nbsp; &nbsp; &nbsp; DetailsPnlV(FQry);</div><div>&nbsp; &nbsp; finally</div><div>&nbsp; &nbsp; &nbsp; if (Arr &lt;&gt; nil)</div><div>&nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Arr.Free;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Arr = nil;</div><div>&nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; //ShowMessage(' query is Served (başarılı)');</div><div>&nbsp; }</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage(' Hata: ' + LastExceptionMessage);</div><div>&nbsp; }</div><div>}</div></div><a href="https://static.cloudflareinsights.com/beac&#111;n.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" target="_blank" rel="nofollow">https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015"</a> integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon="{&quot;version&quot;:&quot;2024.11.0&quot;,&quot;token&quot;:&quot;439455f3e46c40b98dbd42a2f1a954d8&quot;,&quot;r&quot;:1,&quot;server_timing&quot;:{&quot;name&quot;:{&quot;cfCacheStatus&quot;:true,&quot;cfEdge&quot;:true,&quot;cfExtPri&quot;:true,&quot;cfL4&quot;:true,&quot;cfOrigin&quot;:true,&quot;cfSpeedBrain&quot;:true},&quot;location_startswith&quot;:null}}" crossorigin="anonymous">]]>
   </description>
   <pubDate>Thu, 13 Nov 2025 17:44:07 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=1227&amp;PID=2696#2696</guid>
  </item> 
 </channel>
</rss>