#1 2025-08-04 23:21:15

Flashcqxg
Member
Registered: 2018-01-11
Posts: 38

Does moRMot2 support MessagePack?

Does moRMot2 support MessagePack? And does it provide a method like CreateFromMsgPack similar to TOrmTableDataSet.CreateFromJson?

Offline

#2 2025-08-05 06:24:09

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,148
Website

Re: Does moRMot2 support MessagePack?

No, in fact.

And we don't plan to support it because
1) our JSON parser is really efficient and the "non extended" format is pretty small for arrays of results
2) we have our own RTTI-based binary serialization for all the types (not only ORM)

Offline

#3 2025-08-05 07:03:22

Flashcqxg
Member
Registered: 2018-01-11
Posts: 38

Re: Does moRMot2 support MessagePack?

Do you mean that serialization and deserialization for MessagePack can be implemented based on RTTI?
Could you provide a simple example?
Thanks!

Offline

#4 2025-08-05 08:03:32

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,148
Website

Re: Does moRMot2 support MessagePack?

Sadly no, I meant we have OUR OWN binary serialization, which is not compatible with MessagePack, and only valid between two mORMot programs with object pascal RTTI (one may be Delphi, and the other FPC, though: it will work).

Offline

#5 2025-08-05 08:14:58

Flashcqxg
Member
Registered: 2018-01-11
Posts: 38

Re: Does moRMot2 support MessagePack?

thank you.

Offline

Board footer

Powered by FluxBB