You are not logged in.
I need to write custom JSON Serializer. In this case I want to use Synopse RTTI instead of native Delphi RTTI. Is it possible to obtain public fields and properties with Synopse RTTI? I can't find any example for obtaining fields information. For obtaining properties I use following code:
CP := InternalClassProp(AClass);
if CP<>nil then begin
P := @CP^.PropList;
for i := 0 to CP^.PropCount-1 do
begin
LPropertyInfo.PropType := P^.PropType^.Name;
if P^.Index > 0 then
LPropertyInfo.PropLength := P^.Index
else
LPropertyInfo.PropLength := 0;
Result.Add(P^.Name, LPropertyInfo);
P := P^.Next;
end;
end;
Offline