I need to list all object fields including those inherited from other objects, there's no function in typeinfo that returns parent class:
proc listfields(a: TAny) =
for k, v in fields(a):
echo "k = ", k, ", v = ", v.kind
if a.baseTypeKind != akNone:
nil#listFields(a.baseType)
Is it possible to do the thing with current standard library or not?
Or is there a better way to do object serialization? (i'm implementing basic object-SQL serialization and so need fields, their types and ability to read/write value).