+ my %hash=%{$value->value};
+
+ # XML-RPC v1 does not allow for
+ # nil/null/None/undef values to be
+ # transmitted. The <nil/> extension
+ # is the right fix, but for
+ # back-compat, let external plugins send
+ # a hash with one key "null" pointing
+ # to an empty string.
+ if (exists $hash{null} &&
+ $hash{null} eq "" &&
+ int(keys(%hash)) == 1) {
+ return undef;
+ }
+
+ return %hash;