Skip to content

Commit

Permalink
fix(smithy): Only decode XML for non-String types
Browse files Browse the repository at this point in the history
Some properties store XML as strings so we should not decode these values to XML but instead leave them as raw XML strings.
  • Loading branch information
dnys1 committed Apr 8, 2023
1 parent c6fc0fd commit ef25f45
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ class SmithyXmlPlugin implements SerializerPlugin {
if (object is! String || !object.startsWith('<')) {
return object;
}
if (specifiedType == const FullType(String)) {
return object;
}
try {
object = XmlDocument.parse(object);
} on XmlParserException {
Expand Down

0 comments on commit ef25f45

Please sign in to comment.