microtronx 38 Posted November 26, 2019 38 minutes ago, Lars Fosdal said: Can you describe in what way the Json encoding differs? Json examples would be good! Even better would be small self-contained compilable example that demonstrates the difference between 10.3.2 and 10.3.3. Here's a example. 1. Servers method: function tmyServerMethods.Load_Scanning_Functions(vuserid:longint):tstrings; var i:integer; begin result:=tstringlist.create; // data is a query ... for i:=1 to vdata.recordcount do begin result.add(inttostr(vdata.fieldbyname('statusid').asinteger)+'|'+vdata.fieldbyname('statusname').asstring); end; vdata.next; end; end; 2. Answer compiled with Tokyo: {"result":[{"type":"System.Classes.TStringList","id":1,"fields":{"FList":[["10|Einlagern",null],["30|Umlagern",null],["400|Kundenbarcode",null],["100|St\u00FCckgutverladung",null],["400|NVE zu Kundenbarcode",null],["",null],["",null],["",null]],"FCount":5,"FCapacity":8,"FSorted":false,"FDuplicates":"dupIgnore","FCaseSensitive":false,"FOwnsObject":false,"FEncoding":null,"FDefaultEncoding":{"type":"System.SysUtils.TMBCSEncoding","id":2,"fields":{"FCodePage":1252,"FMBToWCharFlags":0,"FWCharToMBFlags":0,"FIsSingleByte":true,"FMaxCharSize":1}},"FLineBreak":"\r\n","FUpdateCount":0,"FDelimiter":",","FQuoteChar":"\"","FNameValueSeparator":"="}}]} 3. Answer compiled with Rio: {"result":[{"type":"System.Classes.TStringList","id":1,"fields":{"FList":[["10|Einlagern",null],["30|Umlagern",null],["400|Kundenbarcode",null],["100|St\u00FCckgutverladung",null],["400|NVE zu Kundenbarcode",null],["",null],["",null],["",null]],"FCount":5,"FCapacity":8,"FSorted":false,"FDuplicates":"dupIgnore","FCaseSensitive":false,"FOwnsObject":false,"FCompareStringsOverriden":false,"FEncoding":"","FDefaultEncoding":"1252","FLineBreak":"\r\n","FUpdateCount":0,"FDelimiter":",","FQuoteChar":"\"","FNameValueSeparator":"="}}]} 4. In the client app (compiled with Tokyo) cannot work with the result. We're no able to update the client apps at the moment. Share this post Link to post
Lars Fosdal 1792 Posted November 26, 2019 That was a very weird difference. It looks like the types of Fencoding and FDefaultEncoding has changed. Can it be that the type you intend to use is being "replaced" by type with the same name, due to a scope issue? Share this post Link to post
microtronx 38 Posted November 26, 2019 (edited) 40 minutes ago, Lars Fosdal said: That was a very weird difference. It looks like the types of Fencoding and FDefaultEncoding has changed. Can it be that the type you intend to use is being "replaced" by type with the same name, due to a scope issue? I do nothing special, i open the project compile it with Tokyo and it works, i open the same project without changing anything with Rio 10.3.3 and it does not work. In Rio and in Tokyo it shows System.Classes.xxx when i move the mouse over tStrings and tStringList Edited November 26, 2019 by microtronx Share this post Link to post
Lars Fosdal 1792 Posted November 26, 2019 Duh! It's the TStringList that has changed... To avoid situations like these, you should build Json that does not embed information that belongs to the container. F.x. type TStatus = class private FId: Integer FName: String; public constructor Create(const aId: Integer; aName: String); function DisplayText: string; property Id: Integer read FId write FId; property Name: String read FName write FName; end; TStatusArray = TArray<TStatus>; constructor TStatus.Create(const aId: Integer; aName: String); begin Id := aId; Name := aName; end; function TStatus.DisplayText: string; begin Result := Id.ToString + '|' + Name; end; function tmyServerMethods.Load_Scanning_Functions(vuserid:longint):TStatusArray; var i:integer; begin result := []; // data is a query ... for i:=1 to vdata.recordcount do begin result := Result + [TStatus.Create(vdata.fieldbyname('statusid').asinteger, vdata.fieldbyname('statusname').asstring)]; vdata.next; end; end; Share this post Link to post
Stefan Glienke 2002 Posted November 26, 2019 (edited) The reason is they added a converter for encoding fields in TStrings to Data.DBXJSONReflect so it writes it different from before. Edited November 26, 2019 by Stefan Glienke Share this post Link to post
microtronx 38 Posted November 26, 2019 1 minute ago, Stefan Glienke said: The reason is they added a converter for encoding fields in TStrings to Data.DBXJSONReflect so it writes it different from before. Great, so all rest-server-apps are not compatible with prior clients ... Share this post Link to post
Lars Fosdal 1792 Posted November 26, 2019 On 11/26/2019 at 11:21 AM, microtronx said: Great, so all rest-server-apps are not compatible with prior clients ... That is unfortunately correct. As mentioned above - if you avoid creating Json that embed container data outside your control, you will avoid such issues. Json as per example above { "result": [{ "Id": 10, "Name": "Einlagern" }, { "Id": 30, "Name": "Umlagern" }, { "Id": 400, "Name": "Kundenbarcode" }, { "Id": 100, "Name": "St\u00FCckgutverladung" }, { "Id": 400, "Name": "NVE zu Kundenbarcode" }, { "Id": 0, "Name": "" }, { "Id": 0, "Name": "" }, { "Id": 0, "Name": "" } ] } Share this post Link to post
microtronx 38 Posted November 26, 2019 4 minutes ago, Lars Fosdal said: That is unfortunately correct. As mentioned above - if you avoid creating Json that embed container data outside your control, you will avoid such issues. New projects are not using things like "tstringlist" as a result ... Yep, we will change all "old" projects. Thx. 1 Share this post Link to post
Andy Vines 1 Posted November 26, 2019 On 11/25/2019 at 12:32 PM, Ugochukwu Mmaduekwe said: You can give Lazarus and FreePascal a try, at least that's what I do these days. I already have Lazarus installed, I use Delphi XE4 for our internal business apps, I just used the Community Edition for Hobby stuff and playing. For information for others considering the Community Edition I have tried to get a new licence for the Community Edition and have failed, it appears you have to jump through hoops after the first year as expired, even though the emails said I should contact support, they just referred me to the faq's and CE page. The FAQ's page states you can update the licence from the web site, I queried this with support as I could find no way of doing that and the latest is that I have had the UK and Ireland agents on (Grey Matter) saying they need to discuss it with me and I have to phone them, so currently uninstalling CE as its just too much hassle. 1 Share this post Link to post
Stéphane Wierzbicki 45 Posted November 26, 2019 Desperately waiting for IDE Fixpack... 😥 1 Share this post Link to post
Guest Posted November 26, 2019 20 minutes ago, Stéphane Wierzbicki said: Desperately waiting for IDE Fixpack... 😥 Yet another release and it is sad. Anyway, i did't read any post about the Navigator and Bookmarks impression ( according to this https://parnassus.co/bookmarks-and-navigator-acquired-by-embarcadero/ ) Are they good ? Share this post Link to post
Joseph MItzen 251 Posted November 26, 2019 5 hours ago, Andy Vines said: For information for others considering the Community Edition I have tried to get a new licence for the Community Edition and have failed, it appears you have to jump through hoops after the first year as expired, even though the emails said I should contact support, they just referred me to the faq's and CE page. This is what they're saying on Reddit too... the software says contact support, and the support team just sends an email back saying to refer to the FAQ which states that support doesn't cover Community Edition. 😞 It's a crazy Catch-22. Share this post Link to post
jbg 239 Posted November 26, 2019 7 hours ago, Stéphane Wierzbicki said: Desperately waiting for IDE Fixpack... 😥 Why? There seem to be no changes in the IDE and the compilers that would brake the current IDE Fix Pack 6.4.4. 1 3 Share this post Link to post
FredS 138 Posted November 26, 2019 (edited) 21 minutes ago, jbg said: Why? I read that as 'why can't Andreas fix all their bugs' 🙂 Edited November 26, 2019 by FredS 1 Share this post Link to post
Gustav Schubert 25 Posted November 27, 2019 On 11/21/2019 at 6:32 PM, Gustav Schubert said: Now I have 10.3.3 CE with two days left. Fixed, 367 more days for my CE installation. I have requested a new license via free-download page, using same email login as always, and got email with new license key. Then I used the license dialog of Tokyo Pro to register new license and delete expired license. Quote from comment on FB page: "Please make sure your license is expired, otherwise you will get the same expiration date as before." This may very well be true. 3 Share this post Link to post
Kryvich 165 Posted November 27, 2019 (edited) @Gustav Schubert I can confirm: they added a new license exclusively for Delphi CE 10.3.3. Thanks Embarcadero. Edited November 27, 2019 by Kryvich 1 Share this post Link to post
Kryvich 165 Posted November 27, 2019 @jbg IDE Fix Pack 6.4.4 installed and works good for me with Delphi CE 10.3.3. As well as my own IDE packages compiled with Delphi CE 10.3.2. Share this post Link to post
Kryvich 165 Posted November 27, 2019 BTW do you see circles next to the file names in tabs of modified files in IDE? Share this post Link to post
Cristian Peța 103 Posted November 27, 2019 About that circles: https://community.idera.com/developer-tools/b/blog/posts/ide-improvements-in-rad-studio-10-3-3 1 Share this post Link to post
Dalija Prasnikar 1396 Posted November 27, 2019 Also there are some bugs with that circles... Stepping through debugger activates file modified icon https://quality.embarcadero.com/browse/RSP-26776 2 Share this post Link to post
Stéphane Wierzbicki 45 Posted November 27, 2019 14 hours ago, jbg said: Why? There seem to be no changes in the IDE and the compilers that would brake the current IDE Fix Pack 6.4.4. Sorry for the confusion! I should have said that I don't understand why your fixes are not TOTALLY included in Delphi RIO! Anyways... I'm still thanking you for all your hard work. 3 Share this post Link to post