Serialize docs before updating.