Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Mojo Lite - Invalid JSON

by Corion (Pope)
on Feb 28, 2020 at 16:37 UTC ( #11113548=note: print w/replies, xml ) Need Help??


in reply to Mojo Lite - Invalid JSON

You are passing an array with a single element, that is another array full of hashes to Datatables.js. Are you sure that this is what Datatables.js wants?

Maybe it is happier with a simple Array-of-Hashes?

my $rows = $dbh->selectall_arrayref($sql, {Slice => {}}); $c->render( json => { data => $rows });

Replies are listed 'Best First'.
Re^2: Mojo Lite - Invalid JSON
by Anonymous Monk on Mar 03, 2020 at 12:38 UTC
    Worked well, thanks for your solution

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11113548]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2020-05-26 18:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (150 votes). Check out past polls.

    Notices?