[Koha-bugs] [Bug 17932] Koha::Object should provide a TO_JSON method

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 3 22:37:24 CET 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17932

--- Comment #17 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to Marcel de Rooy from comment #16)
> (In reply to Tomás Cohen Arazi from comment #15)
> > (In reply to Marcel de Rooy from comment #14)
> > > Thanks, Nick. You beat me in signing off :)
> > 
> > You can QA it ;-)
> 
> Good plan. Just a dumb question btw: why do you use uppercase TO_JSON?
> Is it that important :)
> Note that I see everywhere get_whatever etc.

I personally dislike ->get_whatever, and prefer ->whatever in most cases
(->as_json would be acceptable, because it is clear we want the object in a
specific serialization format).

Anyway, this time we are just sticking to what JSON libraries expect from
blessed objects to accept them for rendering as JSON strings. See 
http://search.cpan.org/~makamaka/JSON-2.90/lib/JSON.pm#allow_blessed

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list