Serializing undo history?

I wanted to know if anyone had any advice for serializing the undo history of the UndoManager? I’m currently using the UndoManager and ValueTrees to manage the state of object instances, and I’d like to be able to store the undo history as part of the session document and be able to restore it later. Has anyone done this using off-the-self JUCE classes, or did you roll your own implementation?