Freshoy
Freshoy

Reputation: 62

Hi, are there any differences between "\/\/" and "//" in the links in schema?

are there any differences between "\ / \ /" and "/ /" in the links in schema?

<script type="application/ld+json">
    {
        "@context": "http:\/\/schema.org",
        "@type": "ContactPage",
        "url": "https:\/\/example.com\/contact"
    }   
</script>

or just

<script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "ContactPage",
        "url": "https://example.com/contact"
    }   
</script>

Upvotes: 0

Views: 368

Answers (1)

Brandon Kauffman
Brandon Kauffman

Reputation: 1865

No \ escape special characters in strings so a new line can be represented as \n or \ for one backslash, but / doesn't need to be escaped in this case so both phrases are the same

Upvotes: 2

Related Questions