I'm looking at $typehint_raws just before calling the encode_json command.... my $typehint_raws = [ ($typehint_raw) x @$arrayref]; my $json = encode_json($arrayref, $typehint_raws); return $json; ...
If you're dumping $typehint_raws just before calling encode_json(), then you're dumping it just after initializing it (according to the posted code). In that case, the situation is just as given in the example here except that it's a hash reference that's being replicated rather than an array ref.
I don't know what encode_json() does to "fill in" $typehint_raws, but it doesn't seem that it can be of much consequence since $typehint_raws goes out of scope with the return statement that immediately follows the subroutine call.
Give a man a fish: <%-{-{-{-<
In reply to Re^9: Is there a way to make a JSON out of multiple records from MySQL?
by AnomalousMonk
in thread Is there a way to make a JSON out of multiple records from MySQL?
by bartender1382
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |