0
I’m creating a dictionary for JSON on Razor Pages, but the quotation marks ("
), are coming out as "
_Layout.cshtml (UTF-8)
...
<body>
...
<script type="application/ld+json">
@JsonConvert.SerializeObject(new Dictionary<string, string>
{
{ "@context", "http://schema.org" },
{ "@type", "Organization" },
{ "name", "Swenity" },
{ "url", "http://swenity.com" },
{ "logo", "/ui/lib/image/platform/swenity/basicPlatformWhite.png" }
})
</script>
...
</body>
Exit:
{"@context":"http://schema.org","@type":"Organization","name":"HAHA","url":"http://example.com","logo":"http://example.com/image.png"}
How can I get them to come out in the correct format? How "
Give a little context. Where the information is being shown?
– Jéf Bueno
@LINQ updated, I’m showing in _Layout.cshtml
– user45722
And where are you seeing the information? By the "inspect element" of the browser?
– Jéf Bueno
Yes, in Microsoft Edge I’m seeing (Inspect Element and Debugger = "Show Source"), in Google Chrome (Inspect and View Page Source)
– user45722
My file is encoded as
UTF-8
– user45722
But what’s the point of this?
– Jéf Bueno
Representation only
– user45722