aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework/OCS/BaseResponse.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/AppFramework/OCS/BaseResponse.php')
-rw-r--r--lib/private/AppFramework/OCS/BaseResponse.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/AppFramework/OCS/BaseResponse.php b/lib/private/AppFramework/OCS/BaseResponse.php
index 3cfe8177ae7..78bcc5586d3 100644
--- a/lib/private/AppFramework/OCS/BaseResponse.php
+++ b/lib/private/AppFramework/OCS/BaseResponse.php
@@ -159,6 +159,10 @@ abstract class BaseResponse extends Response {
$writer->startElement($k);
$this->toXML($v, $writer);
$writer->endElement();
+ } elseif ($v instanceof \JsonSerializable) {
+ $writer->startElement($k);
+ $this->toXML($v->jsonSerialize(), $writer);
+ $writer->endElement();
} else {
$writer->writeElement($k, $v);
}