How do you serialize and deserialize a UObject to/from an FArchive file?

I’ll just add the definition of UMyObject so you can see the two properties and their correspondance to the binary data:

UCLASS()
class TANGOCORE_API UMyObject : public UObject
{
	GENERATED_BODY()
public:
	UMyObject();

	UPROPERTY()
	FString Comment;

	UPROPERTY()
	int32 id;

    /*...*/
};