I already solved my problem, posted about it. But wanted to further explain what you pointed out.
I don't believe that I am looking at copies of the same reference
sub makeJSONToExport { my ($arrayref) = @_; my $typehint_raw = { age => JSON_TYPE_INT, lastname => JSON_TYPE_STRING, firstname => JSON_TYPE_STRING}; my $typehint_raws = [ ($typehint_raw) x @$arrayref]; my $json = encode_json($arrayref, $typehint_raws); return $json; }
I'm looking at $typehint_raws just before calling the encode_json command. So I believe I am seeing it just after it's initialized for the proper size, but before it's filled in by encode_json
In reply to Re^8: Is there a way to make a JSON out of multiple records from MySQL?
by bartender1382
in thread Is there a way to make a JSON out of multiple records from MySQL?
by bartender1382
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |