Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^6: Is there a way to make a JSON out of multiple records from MySQL?

by bartender1382 (Beadle)
on May 12, 2022 at 21:16 UTC ( [id://11143855]=note: print w/replies, xml ) Need Help??


in reply to Re^5: Is there a way to make a JSON out of multiple records from MySQL?
in thread Is there a way to make a JSON out of multiple records from MySQL?

Finally!

Working backwards I went through every item, which took a while, but I finally ended up back in MySQL and here's what I've deduced:

Not every "age" field had a value, in MySQL. Therefore when any particular record with a null "age" came up in the my $json = encode_json($arrayref, $typehint_raws) command, Perl reported the uninitialized warning, yet still produced the proper json output.

So the solution was to make sure that there are no NULL fields in MySQL.

Thanks for everyone's help

Making sure to cast my votes on this thread

  • Comment on Re^6: Is there a way to make a JSON out of multiple records from MySQL?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-25 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found