<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to bugs</title><link>https://sourceforge.net/p/lkjson/bugs/</link><description>Recent changes to bugs</description><atom:link href="https://sourceforge.net/p/lkjson/bugs/feed.rss" rel="self"/><language>en</language><lastBuildDate>Mon, 03 Apr 2017 09:35:33 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/lkjson/bugs/feed.rss" rel="self" type="application/rss+xml"/><item><title>#12 ts := '{"t5":"1\.\.\.\.\."}';</title><link>https://sourceforge.net/p/lkjson/bugs/12/?limit=25#876e</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;. is not a valid json string value&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MtwStark</dc:creator><pubDate>Mon, 03 Apr 2017 09:35:33 -0000</pubDate><guid>https://sourceforge.net19128f3e4ea6e288aefb326f27688f2dcdc3c55b</guid></item><item><title>vJsonObj := TlkJSONstreamed.loadfromfile('Source.txt') as TlkJsonObject; does not work</title><link>https://sourceforge.net/p/lkjson/bugs/16/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;In the sample projects, vJsonObj := TlkJSONstreamed.loadfromfile('Source2.txt') as TlkJsonObject; does not work.&lt;/p&gt;
&lt;p&gt;However, the following does work:&lt;/p&gt;
&lt;p&gt;StringList1 := TStringList.Create;&lt;br /&gt;
  StringList1.LoadFromFile('Source.txt');&lt;br /&gt;
  jsText := StringList1.Text;&lt;br /&gt;
  StringList1.Free;&lt;br /&gt;
  vJsonObj := TlkJSON.ParseText(jsText) as TlkJSONobject;&lt;br /&gt;
  vJsonStr := TlkJSON.GenerateText(vJsonObj);&lt;/p&gt;
&lt;p&gt;I am using Delphi XE8&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alfred</dc:creator><pubDate>Mon, 03 Aug 2015 07:33:53 -0000</pubDate><guid>https://sourceforge.net20ba2b3e4a729d90fae4a2779120db0091ff188e</guid></item><item><title>#13 Setting Extended ASCII Codes in Delphi </title><link>https://sourceforge.net/p/lkjson/bugs/13/?limit=25#8f20</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;in line 1535 alter this&lt;/p&gt;
&lt;p&gt;if obj is TlkJSONstring then&lt;br /&gt;
  begin&lt;br /&gt;
//        ws := UTF8Encode(TlkJSONstring(obj).FValue);&lt;br /&gt;
ws := TlkJSONstring(obj).FValue;&lt;br /&gt;
i := 1;&lt;br /&gt;
mem_ch('"');&lt;br /&gt;
while i &amp;lt;= length(ws) do&lt;br /&gt;
  begin&lt;br /&gt;
    case ws&lt;span&gt;[i]&lt;/span&gt; of&lt;br /&gt;
      '/', '\', '"':&lt;br /&gt;
        begin&lt;br /&gt;
          mem_ch('\');&lt;br /&gt;
          mem_ch(ws&lt;span&gt;[i]&lt;/span&gt;);&lt;br /&gt;
        end;&lt;br /&gt;
      #8: mem_write('\b');&lt;br /&gt;
      #9: mem_write('\t');&lt;br /&gt;
      #10: mem_write('\n');&lt;br /&gt;
      #13: mem_write('\r');&lt;br /&gt;
      #12: mem_write('\f');&lt;br /&gt;
    else&lt;br /&gt;
//              if (ord(ws&lt;span&gt;[i]&lt;/span&gt;) &amp;lt; 32) then&lt;br /&gt;
        if (ord(ws&lt;span&gt;[i]&lt;/span&gt;) &amp;lt; 32) or (ord(ws&lt;span&gt;[i]&lt;/span&gt;) &amp;gt; 122) then&lt;br /&gt;
        mem_write('\u' + inttohex(ord(ws&lt;span&gt;[i]&lt;/span&gt;), 4))&lt;br /&gt;
      else&lt;br /&gt;
        mem_ch(ws&lt;span&gt;[i]&lt;/span&gt;);&lt;br /&gt;
    end;&lt;br /&gt;
    inc(i);&lt;br /&gt;
  end;&lt;br /&gt;
mem_ch('"');&lt;br /&gt;
end&lt;/p&gt;
&lt;p&gt;works for me&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paulo Alexandre</dc:creator><pubDate>Fri, 26 Sep 2014 18:02:18 -0000</pubDate><guid>https://sourceforge.net1091e0cfc896b27f15b47df77ba69aefefc687b3</guid></item><item><title>TlkJSONstreamed.SaveToStream does not work in unicode</title><link>https://sourceforge.net/p/lkjson/bugs/15/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;SizeOf(Char) must be added in the computation:&lt;br /&gt;
  SizeOf(Char) = 1 byte in ascii &lt;br /&gt;
  SizeOf(Char) = 1 word in unicode&lt;/p&gt;
&lt;p&gt;class procedure TlkJSONstreamed.SaveToStream(obj: TlkJSONbase;&lt;br /&gt;
  dst: TStream);&lt;br /&gt;
var&lt;br /&gt;
  ws: string;&lt;br /&gt;
begin&lt;br /&gt;
  if not assigned(obj) then exit;&lt;br /&gt;
  if not assigned(dst) then exit;&lt;br /&gt;
  ws := GenerateText(obj);&lt;br /&gt;
  dst.Write(pchar(ws)^, length(ws)* SizeOf(Char));&lt;br /&gt;
end;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Yann Papouin</dc:creator><pubDate>Fri, 22 Nov 2013 15:04:27 -0000</pubDate><guid>https://sourceforge.netc985a49a5163447e644d1b94c84f71101eceac3c</guid></item><item><title>bug in code2utf function</title><link>https://sourceforge.net/p/lkjson/bugs/14/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The **code2utf** function is not translating UTF8 chars correctly.&lt;br /&gt;
Try This:&lt;br /&gt;
[{"nombre": "Asociaci\u00f3n Interamericana"}] the unicode char U+00D3 correspond to Ó (LATIN CAPITAL LETTER O WITH ACUTE), but code2utf translate the number as Ã.&lt;/p&gt;
&lt;p&gt;I quit using funcion **code2utf**, and start using **chr** function included in delphi. I suppose this fix is only available on Unicode versions of Delphi.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 06 Jul 2011 04:15:38 -0000</pubDate><guid>https://sourceforge.nete941f12d2c33c35be0f1a80ad1253931b8447e97</guid></item><item><title>Setting Extended ASCII Codes in Delphi </title><link>https://sourceforge.net/p/lkjson/bugs/13/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I'm setting the value of an JSON-String in Delphi (the String contains the extended ASCII Code ü (129)). At this time the value is correct inside the JSON-Object. When I use the GenerateText-function the Result does not contain the right value.&lt;/p&gt;
&lt;p&gt;parameter := TlkJSONobject.Create(false);&lt;br /&gt;
ids := TlkJSONlist.Create();&lt;br /&gt;
ids.Add('Flurstück');&lt;br /&gt;
parameter.Add('IDS', ids);&lt;br /&gt;
TlkJSON.GenerateText(parameter):&lt;/p&gt;
&lt;p&gt;'{"IDS":["Flurstück"]}' would be expected.&lt;br /&gt;
'{"IDS":["FlurstÃ¼ck"]}' is returned.&lt;/p&gt;
&lt;p&gt;The value is switched to the wrong value in the following line in GenerateText:&lt;br /&gt;
ws := UTF8Encode(TlkJSONstring(obj).FValue);&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matthias Kretschmar</dc:creator><pubDate>Mon, 12 Apr 2010 10:32:49 -0000</pubDate><guid>https://sourceforge.net7d2dcf7c439cbd5a8e3d25d64d52613983b3a06e</guid></item><item><title>ts := '{"t5":"1\.\.\.\.\."}';</title><link>https://sourceforge.net/p/lkjson/bugs/12/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;ts := '{"t5":"1\.\.\.\.\."}';&lt;br /&gt;
jso := TlkJSON.ParseText(ts) as TlkJSONobject;&lt;br /&gt;
ShowMessage(jso.Field['t5'].Value);&lt;/p&gt;
&lt;p&gt;this is a bug, where jso.Field [ 't5']. Value The value should not be "1"&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ivvn benteng1979</dc:creator><pubDate>Fri, 12 Mar 2010 09:10:49 -0000</pubDate><guid>https://sourceforge.net43792d882e6ff60ee97379fe0ce37a280154a93e</guid></item><item><title>Problem with serialized null values</title><link>https://sourceforge.net/p/lkjson/bugs/11/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I get an EInvalidCast exception with message 'Invalid class typecast', in TlkJSONobject.getString(idx: Integer), when trying to get a string that has been serialized with null value. I think you might get the same error with other types too: getInt(), getDouble()... &lt;/p&gt;
&lt;p&gt;I noticed that it handles nil but not null values. But my application communicates with a java application which serializes null values as null.&lt;/p&gt;
&lt;p&gt;Code to reproduce problem (tested with LkJSON v1.07):&lt;/p&gt;
&lt;p&gt;function TForm1.FromJSON(Json: String): String;&lt;br /&gt;
var&lt;br /&gt;
js : TlkJSONobject;&lt;br /&gt;
begin&lt;br /&gt;
Result := '';&lt;br /&gt;
js := nil;&lt;br /&gt;
try&lt;br /&gt;
js := TlkJSON.ParseText(Json) as TlkJSONobject;&lt;br /&gt;
if Assigned(js) then&lt;br /&gt;
Result := js.getString('description');&lt;br /&gt;
finally&lt;br /&gt;
js.Free;&lt;br /&gt;
end;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;The following calls works:&lt;br /&gt;
FromJSON('{"description":"Bla bla"}');&lt;br /&gt;
FromJSON('{"description":nil}');&lt;/p&gt;
&lt;p&gt;This call fails:&lt;br /&gt;
FromJSON('{"description":null}');&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Mon, 04 Jan 2010 14:45:36 -0000</pubDate><guid>https://sourceforge.net059412b49cd01a82cf1cc2936097031c9491e8c6</guid></item><item><title>unicode problem</title><link>https://sourceforge.net/p/lkjson/bugs/10/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Load from TStrings , GenerateText to string variant (vParams), and load from string variant (vParams).&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 25 Nov 2009 09:02:41 -0000</pubDate><guid>https://sourceforge.net800325bacbeba3c7bb63564c2b1d779ce32e8b46</guid></item><item><title>Incorerct name detection, deletion or addition , with code e</title><link>https://sourceforge.net/p/lkjson/bugs/9/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;To addition to ticket below, I create a test code:&lt;/p&gt;
&lt;p&gt;var&lt;br /&gt;
idx    :Integer;&lt;br /&gt;
JsBase :TlkJSONobject; //TlkJSONbase;&lt;br /&gt;
begin&lt;br /&gt;
JsBase := TlkJSONstreamed.LoadFromFile('c:\start.json') as TlkJSONobject; //see attachments&lt;/p&gt;
&lt;p&gt;idx := JsBase.IndexOfName('LASTUPDATE');&lt;br /&gt;
JsBase.Delete(idx);&lt;br /&gt;
JsBase.Add('LASTUPDATE', 0);&lt;/p&gt;
&lt;p&gt;idx := JsBase.IndexOfName('CHECKDATE');&lt;br /&gt;
JsBase.Delete(idx);&lt;br /&gt;
JsBase.Add('CHECKDATE',  0);&lt;/p&gt;
&lt;p&gt;//here state is:&lt;br /&gt;
// JsBase.NameOf[0] = 'LASTUPDATE'&lt;br /&gt;
// TlkJSON.GenerateText(JsBase.Child[0]) = '"LASTUPDATE":0'&lt;br /&gt;
// but&lt;br /&gt;
// JsBase.IndexOfName('TTODGAgent')  also == 0 !!!&lt;br /&gt;
// TlkJSON.GenerateText(JsBase.FieldByIndex[0]) == '{"HOST":"127.0.0.1","PORT":8082,"LOGIN":"admin2..... i.e. text of 'TTODGAgent'&lt;br /&gt;
//for example &lt;/p&gt;
&lt;p&gt;idx := JsBase.IndexOfName('TTODGAgent');&lt;br /&gt;
if idx&amp;gt;=0 then begin;&lt;br /&gt;
JsBase.Delete(idx);&lt;br /&gt;
FreeAndNil(JsBase);&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;//here no 'TTODGAgent' but 'LASTUPDATE' will be deleted!!! &lt;br /&gt;
//see screenshot in previous ticket&lt;br /&gt;
end;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">SergeyNikitin</dc:creator><pubDate>Tue, 17 Nov 2009 20:09:23 -0000</pubDate><guid>https://sourceforge.nete10110ed9c261873230a7fc3a49e0eb95bba9ceb</guid></item></channel></rss>