diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-02-23 01:09:08 +0100 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-02-23 01:09:08 +0100 |
commit | c893bcf568f8e48a68e968299be7a9fc946f7226 (patch) | |
tree | 4e8978c780972bc4208587863e2f502a0ac15b17 | |
parent | efa7ae77b14ad2d9caa34ce9cbed803dcde5bd95 (diff) | |
download | bugzilla-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
-rw-r--r-- | Bugzilla/Object.pm | 5 |
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 #### ############################### |