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?? |
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
In Section
Seekers of Perl Wisdom
|
|