#1 Yesterday 07:58:38

dka1
Member
From: Greece
Registered: 2017-07-25
Posts: 29

json string as IDocAny

Hello ab,
I am study the new mormot2 json IDocDict,IDocList it is very usefull to handle json structure by interfaces.
I see DocDict('{}') and DocList('[]') but how load a json string that do not know if is object or array.
Can I build a DocAny that load object or array json string?

Thanks

Offline

#2 Yesterday 16:18:06

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

Re: json string as IDocAny

IDocDict is a dictionary/object.
IDocList is a list/array.
If you want to store anything use a variant.
And behind the scene both IDocDict/IDocList store their data within a custom variant type - a TDocVariant.

Offline

Board footer

Powered by FluxBB