You are not logged in.
Pages: 1
Hi all,
I am new here and not shure whether I am right at this point.
If not please apologize me and put me through to the correct position.
My question:
I found an article depending on "JSON serialization of records" at this address:
https://blog.synopse.info/?post/2014/05 … anced-RTTI
And my problem is. I don't know the environement and structur of your projects/Sources
The syncommon.pas is member of wich project?
Can it be used "standalone" or do I need som more?
What must I download from where to realise a serialization in delphi 10.4?
best regards and thank you all for help
Charly
Offline
SynCommons is part of mORMot 1 = https://github.com/synopse/mORMot
And you have a new version in mORMot 2 = https://github.com/synopse/mORMot2
But it is part of the whole framework, especially for mORMot 2, which has split SynCommons.pas into smaller - and more maintainable - units.
Online
Hi ab,
i did it as in the README.md at github.com/synopse/mORMot2 is written.
Downloaded the Project and the momot2static.7z, extracted this at ../static
created a environment variable mormot2 and
entered the path-string to the IDE lobrary path.
I work with Delphi 10.4 Community
A can open the ../test/mormot2tests.dproj
during compilation I got the error:
[dcc32 Error] mormot.core.variants.pas(5104): E2250 There is no overloaded version of 'SaveToJson' that can be called with these arguments
if item.Kind in (rkRecordOrDynArrayTypes + [rkClass]) then
begin
// use temporary non-expanded JSON conversion for complex nested content
// aItems.SaveToJson(json, [twoNonExpandedArrays]);
aItems.SaveToJson(json, false); <------------------------------------ so it compiles well!!!!
Do I have a wrong mormot.core.data??
Charly
Offline
This is a mistake in commit 20d34d0. Try this:
aItems.SaveToJson(json, False, [twoNonExpandedArrays]);
With best regards
Thomas
Offline
Danke!
I found an other point to fix.
In the description https://github.com/synopse/mORMot2 Quick Start
in the path list
$(mormot2)\src\core;$(mormot2)\src\db;$(mormot2)\src\rest;$(mormot2)\src\crypt;$(mormot2)\src\script;$(mormot2)\src\app;$(mormot2)\src\net;$(mormot2)\src\orm;$(mormot2)\src\soa;$(mormot2)\src\lib
the entry : $(mormot2)\src is missing.
Without this, in my IDE the mormot.defines.inc isn't found.
Charly
Offline
You are right.
Should be fixed by https://github.com/synopse/mORMot2/commit/5c1329a8
Online
Pages: 1