Changing/Adding mods to a world

I have a world that I’ve had for a long time and wanted to change up the mods or even just add some new ones. Is there any easy way to do this?

Edit the mods json file in the save directory.
Add idents of the new mods there.

Adding most mods works fine, removing some mods may result in errors on load (some of them recoverable).