Menu

#16 vJsonObj := TlkJSONstreamed.loadfromfile('Source.txt') as TlkJsonObject; does not work

v1.0 (example)
open
nobody
None
5
2015-08-03
2015-08-03
Alfred
No

In the sample projects, vJsonObj := TlkJSONstreamed.loadfromfile('Source2.txt') as TlkJsonObject; does not work.

However, the following does work:

StringList1 := TStringList.Create;
StringList1.LoadFromFile('Source.txt');
jsText := StringList1.Text;
StringList1.Free;
vJsonObj := TlkJSON.ParseText(jsText) as TlkJSONobject;
vJsonStr := TlkJSON.GenerateText(vJsonObj);

I am using Delphi XE8

Discussion


Log in to post a comment.

MongoDB Logo MongoDB