This looks okay in theory, but I think a signal callback for the render_done signal would be better. That would also make sure that the parent's json blob is only updated if the saving of the document successfully ran.