I've made a persistent class that works perfectly when streamed and destreamed (to/from JSON in this case, so presumably it would work using any other component streaming approach). Given that it is now set up in a such way that instances of it can be correctly recreated with some RTTI magic, I was wondering if there exists a way to "automatically" make the Assign method do the right thing, without me having to write any manual copy / assignment code? In other words, since I could write the Assign method of my class to stream the source argument and then destream it to Self and achieve the desired result (in a very roundabout way), I would think there's a way to cut out the middleman and have the assignment be performed directly.
The idea feels very obvious, but I'm having difficulty expressing it concisely (probably the reason my search efforts have turned up nothing). Is there a straightforward / "official" way to do what I'm asking for?