You are not logged in.
Hi,
Code snippet:
mormot service method returns base64 string on Lazarus
When visiting the url: http://localhost:11111/root/NotebookService.List
With Delphi returns:
{
"result": [
[
{
"ID": 9,
"Title": "New Notebook 1",
"GUID": "",
"CurrentNote": 0
},
{
"ID": 10,
"Title": "New Notebook 2",
"GUID": "",
"CurrentNote": 0
}, ...
With Lazarus (v3.4 fpc 3.2.2, installed with fpcupdeluxe) returns:
{"result":[["AA4GAAAAAAEAAAAAAAAADk5ldyBOb3RlYm9vayAxAAAAAAAAAAAAAgAAAAAAAAAOTmV3IE5vdGVib29rIDIAAAAAAAAAAAADAAAAAAAAAA5OZXcgTm90ZWJvb2sgMwAAAAAAAAAAAAQAAAAAAAAADk5ldyBOb3RlYm9vayA0AAAAAAAAAAAABQAAAAAAAAAOTmV3IE5vdGVib29rIDUAAAAAAAAAAAAGAAAAAAAAAA5OZXcgTm90ZWJvb2sgNgAAAAAAAAAAAA=="],200]}
I'm on Windows 10
Last edited by RaelB (2024-09-23 21:49:39)
Offline
Lazarus does not have rtti for records, so you should inform mormot about typeinfo
Check the function: TRttiJson.RegisterFromText
Offline
Please follow the forum rules:
1) first make a minimal search in the forum.
This very same question has been asked a few days ago in the forum:
https://synopse.info/forum/viewtopic.php?id=6994
My response at that time still applies.
2) Do not put code in the forum thread itself.
Offline
For the best search results use Google with <keywords> site:synopse.info. The forum search can be unreliable and this approach has the advantage of also returning blog posts.
Offline