Using RTTI to convert record to/from string - DelphiFeeds.com


http://www.delphifeeds.com/go/f/106459

Comments

  1. Stupid quesiton: why not use readymade conversion to XML or JSON from SuperObject or mORMot - and both XML and JSON are strings ;-)

    ReplyDelete
  2. Stupid response: You missed the point. The point is not to convert anything in particular. The point was to show how to use RTTI to get access to record fields. It was just handy to show it demonstrated with trivial To/From string conversion. If you use SuperObject or mormot or anything else, you still don't know how to do it for other purposes and other contexts. What is important to remember after reading the article is not how to convert a record to/from a string but how to access record fields without knowing every détails.

    ReplyDelete
  3. Well, i judge it by topic value. It does not say "yet another tutorial to use rtti" but "yet another lib to serialize objects" OTOH even as tutorial personally I'd rather use some time-proven library's sources. After seing articles like suggesting using IntToHex for comparison with hex const, I tend to be very wary when seeing code made up for that article rather than proven by use in the wild.

    ReplyDelete

Post a Comment