I suppose the real Julia trick used to make this nice is the generated function. There isn’t really anything like this in C without code generation.
Other languages with macros can do this sort of thing but one then needs to “derive blob” or something like that.
In Haskell one could probably do it with Generic (ie the compiler generates a data representation of the type; you write a function to go from this representation to your deserialisation function; and then the compiler does a crazy amount of inlining)
An alternative way to do this in an object oriented language is with a different metaclass that does the appropriate dereferencing. But this risks being slow if not compiled well