Wocart

@wocart/storefront v3.1.0


@wocart/storefront / index / jsonLd

Function: jsonLd()

jsonLd(value): string

Structured data as the text of a <script type="application/ld+json">: JSON with <, >, & and the two line separators escaped, so no value — a product name holding </script> — can end the script or start markup.

Code
<script type="application/ld+json" set:html={jsonLd(productStructuredData(product, { url }))} />

Parameters

value

unknown

Returns

string