How can avoid PHP json_encode to escape URL when I use it for JSON LD? [duplicate]

I use an array to store my Json Ld content

$arJsonLd = array(
            "@context" => "https://schema.org",
            "@type" => "NewsArticle"
        );

I did search here how to convert a PHP array to Json Ld output and multiple answer pointed me to

json_encode($arJsonLd, JSON_PRETTY_PRINT);

the problem is that URLs get escaped

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "NewsArticle"
 }
 </script>

how can I avoid this? On Json Ld documentation url aren’t escaped