Jump to content
Sign in to follow this  
Arnaud Bouchez

ANN: IDocList/IDocDict JSON for Delphi and FPC

Recommended Posts

Since years, our Open Source mORMot framework offers several ways to work with any kind of runtime arrays/objects documents defined, e.g. via JSON, with a lot of features, and very high performance.

 

Our TDocVariant custom variant type is a powerful way of working with such schema-less data, but it was found confusing by some users.
So we developed a new set of interface definitions around it, to ease its usage, without sacrificing its power. We modelized them around Python Lists and Dictionaries, which is proven ground - with some extensions of course.

 

Two one-liners may show how our mORMot library is quite unique in the forest/jungle of JSON libraries for Delphi (and FPC):
+]

  1. assert(DocList('[{ab:1,cd:{ef:"two"}}]')[0].cd.ef = 'two');
  2. assert(DocList('[{ab:1,cd:{ef:"two"}}]').First('ab<>0').cd.ef = 'two');

Yes, this code compiles and run on Delphi - even the antique Delphi 7. 😆

 

If you compare e.g. to how the standard JSON library works in the RTL, with all its per-node classes, you may find quite a difference!
And there is no secret in regard to performance, that our JSON processing is fast.

 

More info:

https://blog.synopse.info/?post/2024/02/01/Easy-JSON-with-Delphi-and-FPC

:classic_cheerleader:

Edited by Arnaud Bouchez
  • Like 7
  • Thanks 3

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×