From c893bcf568f8e48a68e968299be7a9fc946f7226 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Mon, 22 Feb 2010 16:09:08 -0800 Subject: 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 --- Bugzilla/Object.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Bugzilla/Object.pm') 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 #### ############################### -- cgit v1.2.3-24-g4f1b