The message you're getting (at character offset 0 (before "Content-type: applic...")) makes it sound like there's something wrong with $response->content, but you haven't shown what module you're using to decode the JSON, what $json_text actually contains (using e.g. Data::Dumper or Data::Dump), or what URL you're fetching it from. What you have shown works fine for me. Please provide a runnable SSCCE that we can use to reproduce the error.

use warnings; use strict; use Data::Dump; use JSON::MaybeXS qw/decode_json/; my $json_text = do { local $/; <DATA> }; dd decode_json($json_text); __DATA__ {"myData":["https://www.sante.de/fileadmin/user_upload/Stellenanzeige_ +Mitarbeiter_Research__Development.pdf","https://www.national-bank.de/ +fileadmin/user_upload/nationalbank/Vermoegensmanagement/Research/Kapi +talmarkt_Studien/Kapitalmarktmonitor_Dezember_2018.pdf","https://www. +acxit.com/en/wp-content/uploads/2018/12/CAREERS_Stellenanzeige_WS_Res +earch_Deal_Generation_20181211.pdf","https://www.s-a.uni-muenchen.de/ +studierende/jobboerse/jobangebote/aktuelle/20181221_44.pdf","https:// +www.dbresearch.de/PROD/RPS_DE-PROD/PROD0000000000459596/Deutscher_H%C +3%A4user-_und_Wohnungsmarkt_2018.pdf","https://www.bayernlb.de/intern +et/media/de/ir/downloads_1/bayernlb_research/multiasset_produkte/Pers +pektiven.pdf","https://www.borders-in-motion.de/documents/12991/34723 +4/Flyer_Research_Factory_WS18-19.pdf/2baa6987-219a-4cbb-8ab0-da36754f +1282","https://deka.de/site/dekade_privatkunden_site/get/documents/de +kade/Publikationen/2018/Volkswirtschaft/Aktuell/20181220_VA_USA_Zinse +ntscheid.pdf","https://www.dmtm.com/medienverwaltung/medien/181218_Re +search_Engineer_Website.pdf","https://www.ewi.research-scenarios.de/c +ms/wp-content/uploads/2018/08/Czock_CV_de_20181214.pdf"]}

Update: I see Corion made many of the same points.


In reply to Re: json Array with URI by haukex
in thread json Array with URI by IB2017

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.