@aws-sdk/core
Advanced tools
@@ -67,7 +67,4 @@ import { determineTimestampFormat } from "@smithy/core/protocols"; | ||
| const out = []; | ||
| const sparse = !!ns.getMergedTraits().sparse; | ||
| for (const item of value) { | ||
| if (sparse || item != null) { | ||
| out.push(this._read(listMember, item)); | ||
| } | ||
| out.push(this._read(listMember, item)); | ||
| } | ||
@@ -79,7 +76,4 @@ return out; | ||
| const out = {}; | ||
| const sparse = !!ns.getMergedTraits().sparse; | ||
| for (const [_k, _v] of Object.entries(value)) { | ||
| if (sparse || _v != null) { | ||
| out[_k] = this._read(mapMember, _v); | ||
| } | ||
| out[_k] = this._read(mapMember, _v); | ||
| } | ||
@@ -86,0 +80,0 @@ return out; |
@@ -57,3 +57,2 @@ import { parseXML } from "@aws-sdk/xml-builder"; | ||
| if (typeof value === "object") { | ||
| const sparse = !!traits.sparse; | ||
| const flat = !!traits.xmlFlattened; | ||
@@ -65,7 +64,8 @@ if (ns.isListSchema()) { | ||
| const source = flat ? value : (value[0] ?? value)[sourceKey]; | ||
| if (source == null) { | ||
| return buffer; | ||
| } | ||
| const sourceArray = Array.isArray(source) ? source : [source]; | ||
| for (const v of sourceArray) { | ||
| if (v != null || sparse) { | ||
| buffer.push(this.readSchema(listValue, v)); | ||
| } | ||
| buffer.push(this.readSchema(listValue, v)); | ||
| } | ||
@@ -90,5 +90,3 @@ return buffer; | ||
| const value = entry[valueProperty]; | ||
| if (value != null || sparse) { | ||
| buffer[key] = this.readSchema(memberNs, value); | ||
| } | ||
| buffer[key] = this.readSchema(memberNs, value); | ||
| } | ||
@@ -95,0 +93,0 @@ return buffer; |
+1
-1
| { | ||
| "name": "@aws-sdk/core", | ||
| "version": "3.973.16", | ||
| "version": "3.973.17", | ||
| "description": "Core functions & classes shared by multiple AWS SDK clients.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
362742
-0.31%8655
-0.28%