Ouch! Is there no way we can get JSON to do some of this parsing for us, i.e. to go to the domain representation more directly?