Provided you have generated RTTI (Published property, TComponent, {$M+}, published,not public, the easiest is to use writecomponentresfile and readcomponentresfile and family (TStream).
There are many examples for this, both for Delphi and Freepascal/Lazarus.
Both functions take just a filename and a TComponent as parameters. Those will also read/write the published properties of any children.