Add shared implementation for deserializing JSON representations
into domain objects.