fn payload_body_parser(
    payload_type: ShapeType,
    output_shape: &str,
    payload_member: &str,
    mutable_result: bool,
    payload_required: bool,
) -> String {
    let response_body = if payload_required {
        match payload_type {
            ShapeType::Blob => "response.body",
            _ => "String::from_utf8_lossy(response.body.as_ref())",
        }
    } else {
        match payload_type {
            ShapeType::Blob => "Some(response.body)",
            _ => "Some(String::from_utf8_lossy(response.body.as_ref()).into_owned())",
        }
    };

    format!(
        "
        let {mutable} result = {output_shape}::default();
        result.{payload_member} = {response_body};
        ",
        output_shape = output_shape,
        payload_member = payload_member.to_snake_case(),
        response_body = response_body,
        mutable = if mutable_result { "mut" } else { "" }
    )
}
Take the raw http response body and assign it to the payload field
on the result object
service_crategen/src/commands/generate/codegen/rest_json.rs