On 01/16/2014 09:33 AM, sri wrote:
$self->renderer->add_handler(json => sub {
    my ($self, $c, $output, $data) = (@_);
    $$output = JSON::XS->new->encode($data->{json});
});

Can be done, but doesn't work for all the other aspects of the framework
where Mojo::JSON is also used. (WebSockets for example)
Ah, okay didn't know that... what's your feeling on having an attribute exposed in Mojolicious.pm that sets the JSON encoder/decoder class? Be a bit of work to get that change worked through everywhere but feels a bit cleaner to me, and turns it into a very explicit opt-in. Then again not like I have time to code but...

--
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to