[Catalyst] Catalyst::View::JSON parameters
Tatsuhiko Miyagawa
miyagawa at gmail.com
Mon Dec 3 21:54:54 GMT 2007
On 12/3/07, Ian Docherty <catalyst at iandocherty.com> wrote:
> I did not fully understand this but I think you are suggesting using this to
> create a new JSON
> encoder. This is not what I want to do, I just want to pass parameters to an
> existing encoder.
I didn't mean you want to build an entire new JSON encoder from
scratch but there's a way to pass a new encoder object (not
necessarily what you build your own) to json_dumper, like
$obj->json_dumper(sub { JSON::Any->new(%param)->objToJson($_[0]) })
and you can probably do that in YourApp::View::JSON.
--
Tatsuhiko Miyagawa
More information about the Catalyst
mailing list