Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/3rdparty.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'aws/aws-sdk-php/src/Api/Parser/JsonParser.php')
-rw-r--r--aws/aws-sdk-php/src/Api/Parser/JsonParser.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/aws/aws-sdk-php/src/Api/Parser/JsonParser.php b/aws/aws-sdk-php/src/Api/Parser/JsonParser.php
index e3362e1a..ef981541 100644
--- a/aws/aws-sdk-php/src/Api/Parser/JsonParser.php
+++ b/aws/aws-sdk-php/src/Api/Parser/JsonParser.php
@@ -17,6 +17,9 @@ class JsonParser
switch ($shape['type']) {
case 'structure':
+ if (isset($shape['document']) && $shape['document']) {
+ return $value;
+ }
$target = [];
foreach ($shape->getMembers() as $name => $member) {
$locationName = $member['locationName'] ?: $name;
@@ -24,6 +27,15 @@ class JsonParser
$target[$name] = $this->parse($member, $value[$locationName]);
}
}
+ if (isset($shape['union'])
+ && $shape['union']
+ && is_array($value)
+ && empty($target)
+ ) {
+ foreach ($value as $key => $val) {
+ $target['Unknown'][$key] = $val;
+ }
+ }
return $target;
case 'list':