Skip to content

Commit cd1adcd

Browse files
committed
SDK v0.2.2
1 parent a4213d5 commit cd1adcd

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

plugin/lib/Aplazame/Sdk/Api/ApiRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class Aplazame_Sdk_Api_ApiRequest extends Aplazame_Sdk_Http_Request {
44

5-
const SDK_VERSION = '0.2.1';
5+
const SDK_VERSION = '0.2.2';
66
const FORMAT_JSON = 'json';
77
const FORMAT_XML = 'xml';
88
const FORMAT_YAML = 'yaml';

plugin/lib/Aplazame/Sdk/Serializer/JsonSerializer.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ public static function serializeValue( $value ) {
1818
}
1919

2020
if ( is_object( $value ) ) {
21-
$value = (array) $value;
21+
foreach ( get_object_vars( $value ) as $nestedKey => $nestedValue ) {
22+
$value->{$nestedKey} = self::serializeValue( $nestedValue );
23+
}
24+
25+
return $value;
2226
}
2327

2428
if ( is_array( $value ) ) {

0 commit comments

Comments
 (0)