aws_sdk_workdocs/protocol_serde/
shape_conflicting_operation_exception.rs1pub(crate) fn de_conflicting_operation_exception_json_err(
3 value: &[u8],
4 mut builder: crate::types::error::builders::ConflictingOperationExceptionBuilder,
5) -> ::std::result::Result<crate::types::error::builders::ConflictingOperationExceptionBuilder, ::aws_smithy_json::deserialize::error::DeserializeError>
6{
7 let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable();
8 let tokens = &mut tokens_owned;
9 ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
10 loop {
11 match tokens.next().transpose()? {
12 Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
13 Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
14 "Message" => {
15 builder = builder.set_message(
16 ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
17 .map(|s| s.to_unescaped().map(|u| u.into_owned()))
18 .transpose()?,
19 );
20 }
21 _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
22 },
23 other => {
24 return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
25 "expected object key or end object, found: {:?}",
26 other
27 )))
28 }
29 }
30 }
31 if tokens.next().is_some() {
32 return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
33 "found more JSON tokens after completing parsing",
34 ));
35 }
36 Ok(builder)
37}