From: Max Kanat-Alexander Date: Tue, 23 Feb 2010 00:09:51 +0000 (-0800) Subject: Bug 486074: Allow the JSON-RPC interface to properly serialize objects X-Git-Tag: bugzilla-3.6rc1~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecb960cc8d060799d2d400f3a876b68d73e5e5c1;p=thirdparty%2Fbugzilla.git 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 --- diff --git a/Bugzilla/Object.pm b/Bugzilla/Object.pm index 0bb865ea60..27098806e5 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 #### ###############################