Using render(json => ...) doesn't work fine for Cyrillic symbols, that's 
why I use data => . 

On Monday, February 16, 2015 at 4:01:52 PM UTC+3, John wrote:
>
>
> On 02/16/2015 06:36 AM, Magnificent Core wrote: 
> > Hi all. 
> > 
> > I've noticed, that when json is rendered, sometimes it's rendered 
> > actually twice. 
> > 
> > Here's the code I have: 
> > get '/test' => sub { 
> >     my $self =shift; 
> >     $self->render(data => encode_json {'a' => 'b'}); 
> > }; 
>
> I bet the render and encode_json are doing something similar. 
>
> Try this: 
>
> $self->render(json => { a => 'b' } ); 
>
> See docs for this render option. 
>
> John 
>
>

-- 
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/d/optout.

Reply via email to