From f231c23b759b07a90bd04f53619c980c30e95f14 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 26 Jul 2013 14:25:25 -0400 Subject: [PATCH] Only serialize JSON and HTML, not the C::C::REST defaults Signed-off-by: Shea Levy --- src/lib/Hydra/Base/Controller/REST.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/Hydra/Base/Controller/REST.pm b/src/lib/Hydra/Base/Controller/REST.pm index 606f0e09..7adb1cf4 100644 --- a/src/lib/Hydra/Base/Controller/REST.pm +++ b/src/lib/Hydra/Base/Controller/REST.pm @@ -4,8 +4,12 @@ use strict; use warnings; use base 'Catalyst::Controller::REST'; +# Hack: Erase the map set by C::C::REST +__PACKAGE__->config( map => undef ); __PACKAGE__->config( map => { + 'application/json' => 'JSON', + 'text/x-json' => 'JSON', 'text/html' => [ 'View', 'TT' ] }, default => 'text/html',