It seems that @my_A contains a string which is already JSON-encoded. Passing it to encode_json double-encodes it, ie escapes all quotes with backslashes.
If that is the case, you can produce your desired result through a simple text operation, like
my $json_output = '{"JSON1:[" . join(',', @my_A) .']}';
of you have to decode the existing JSON string before inserting it into a data structure that you pass to encode_json.
In reply to Re: perl-json format
by moritz
in thread perl-json format
by divyaP
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |