json import of regions

this is terribly untested, it barely compiles.