When JSON column contains utf8 string Mojo::Pg unable expand this data to
hash. Example:

use Mojo::Pg;
use Mojo::Base -base;

my $db = Mojo::Pg->new->db;

$db->query('create table test (name text)');
$db->query("insert into test (name) values ('♥')");

say $db->query('select name from test')->array->[0]; # ♥
$db->query("select name, json_build_object('value', name) from
test")->expand->hashes; # exception "Input is not UTF-8 encoded"

I don't need to use expand in this case?

-- 
Andrey Khozov

-- 
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