Fix legacy json import/export

I should hopefully have caught up with the latest refactorings... ;).