Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
use JSON::XS ();
use DBIx::Class::ResultClass::HashRefInflator;
my $jsoner = JSON::XS->new->utf8(0)->allow_blessed;
sub country {
my $self = shift;
my $c = schema->resultset('Country')->search(undef, {
result_class => 'DBIx::Class::ResultClass::HashRefInflator',
return $self->render_json( $jsoner->encode( $c->first ) );

This comment has been minimized.

Copy link
Owner Author

@akzhan akzhan commented Jul 2, 2016

Take a note at ->utf8(0) mutator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment