コード例 #1
0
 /// <summary>
 /// Returns the JSON-LD representation of this instance, including "https://schema.org" in the "@context".
 ///
 /// This method must be used when you want to embed the output raw (as-is) into a web
 /// page. It uses serializer settings with HTML escaping to avoid Cross-Site Scripting (XSS)
 /// vulnerabilities if the object was constructed from an untrusted source.
 ///
 /// This method overrides Schema.NET ToHtmlEscapedString() to serialise using OpenActiveSerializer.
 /// </summary>
 /// <returns>
 /// A <see cref="string" /> that represents the JSON-LD representation of this instance.
 /// </returns>
 public new string ToHtmlEscapedString()
 {
     return(OpenActiveSerializer.SerializeToHtmlEmbeddableString(this));
 }
コード例 #2
0
 /// <summary>
 /// Returns the JSON-LD representation of this instance.
 /// This method overrides Schema.NET ToString() to serialise using OpenActiveSerializer.
 /// </summary>
 /// <returns>A <see cref="string" /> that represents the JSON-LD representation of this instance.</returns>
 public override string ToString()
 {
     return(OpenActiveSerializer.Serialize(this));
 }