At a guess, I think you'd do something like this:
#!/usr/bin/perl use DBI; use JSON; ... $sth->execute(); while (my $hr = $sth->fetchrow_hashref) { push @array, $hr; } my $json = JSON->new; print $json->objToJson(@array);
Caveat emptor, etc.
In reply to Re: JSON module
by duff
in thread JSON module
by hallikpapa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |