Update JSON import/export to use API as well