[fpc-pascal] Re: Variant vs Pointer
Luiz Americo Pereira Camara
luizmed at oi.com.br
Sat Mar 3 16:49:59 CET 2012
On 3/3/2012 10:08, Marcos Douglas wrote:
> Think in my class like a Business Object.
> The struct is very similar with TParams it has many TParam. The data,
> in a TParam, is save in a Variant type.
> I need something like:
> u := TmyBO.Create; // the name does matter
> u.Attr['name'].Value := 'Marcos'; // an instance is created and the
> name is 'name' and the type is string
>
TJSONObject (unit fpjson) does exactly that
I use this way extensively
Luiz
More information about the fpc-pascal
mailing list