summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-02-23 01:09:08 +0100
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-02-23 01:09:08 +0100
commitc893bcf568f8e48a68e968299be7a9fc946f7226 (patch)
tree4e8978c780972bc4208587863e2f502a0ac15b17 /Bugzilla
parentefa7ae77b14ad2d9caa34ce9cbed803dcde5bd95 (diff)
downloadbugzilla-c893bcf568f8e48a68e968299be7a9fc946f7226.tar.gz
bugzilla-c893bcf568f8e48a68e968299be7a9fc946f7226.tar.xz
Bug 486074: Allow the JSON-RPC interface to properly serialize objects
to JSON, so that the Bug.get "internals" return item works. r=dkl, a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Object.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/Bugzilla/Object.pm b/Bugzilla/Object.pm
index 11db7567b..a54cf7caa 100644
--- a/Bugzilla/Object.pm
+++ b/Bugzilla/Object.pm
@@ -38,6 +38,11 @@ use constant UPDATE_VALIDATORS => {};
use constant NUMERIC_COLUMNS => ();
use constant DATE_COLUMNS => ();
+# This allows the JSON-RPC interface to return Bugzilla::Object instances
+# as though they were hashes. In the future, this may be modified to return
+# less information.
+sub TO_JSON { return { %{ $_[0] } }; }
+
###############################
#### Initialization ####
###############################