On Sat, Mar 3, 2012 at 12:57 PM, silvioprog <silviop...@gmail.com> wrote:
> 2012/3/3 Luiz Americo Pereira Camara <luiz...@oi.com.br>:
>> 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
>
> Me too. TJSONObject is very nice. Please see Fields and Params in:
>
> https://github.com/silvioprog/lazwebsolutions/blob/master/Core/LWSCGI.pas
>
> In my personal tests I noticed that TJSONObject is very fast.

Thanks Luiz and Silvio.
If I will implement using subclasses for each type, I think this is a
good choice for now.

But I'm still curious about the Ludo's implementation.

Marcos Douglas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to