Forum > Third party

ANN: IDocList/IDocDict JSON for Delphi and FPC


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, including several enumerators for ranges or searching.

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

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---assert(DocList('[{ab:1,cd:{ef:"two"}}]')[0].cd.ef = 'two');assert(DocList('[{ab:1,cd:{ef:"two"}}]').First('ab<>0').cd.ef = 'two');Yes, this code compiles and run on FPC.  :D

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. The fastest for FPC for sure.

More info:

Very cool and useful, and I bet it is fast as always.
Thanks ab!
I'm going to test it now.

PS. Your blog needs a code highlighter to appreciate this beauty. BTW And I didn't know you like music.

Interesting to know interfaces are that dynamic.


[0] Message Index

Go to full version