#1 2019-08-04 07:56:20

esmondb
Member
From: London
Registered: 2010-07-20
Posts: 299

CBOR data format

Could it make sense for mORMot to support CBOR in the future?
It seems a more compact data format than JSON for sending data. But I've only skimmed the RFC.
see cbor.io

Offline

#2 2019-08-04 17:05:30

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,183
Website

Re: CBOR data format

I know it - and almost all its alternatives... there is almost a new binary serialization format each month...
CBOR is more tied to IoT and small code size IIRC.

In practice, we support only JSON since it is fairly small in size, especially after SynLZ compression, and we have very fast parser for it.
And any app on the client side also has a JSON parser. No need to something more complicated.

For binary serialization, we have our own RTTI-based format, which is tied to Delphi/FPC RTTI, and is very efficient.
For even more efficient format, our binary reader/writer have variant integer and other stuffs which are pretty good (see for instance how the .map file from Delphi debug info is compressed into our binary format).
This is what we use on production with very good performance/compression ratio.

So we don't have time nor would particularly like to support CBOR.
But we are still looking close to every new format appearing... waiting for something worth it...

Offline

#3 2019-08-05 08:23:42

edwinsn
Member
Registered: 2010-07-02
Posts: 1,215

Re: CBOR data format

I agree with ab. One of the beautiful things about JSON is that it's human-readable and it has a huge advantage when debugging or testing.

Last edited by edwinsn (2019-08-06 04:41:56)


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#4 2019-08-05 20:59:17

esmondb
Member
From: London
Registered: 2010-07-20
Posts: 299

Re: CBOR data format

Thanks for the answers.
JSON does seem more KISS smile

Offline

Board footer

Powered by FluxBB