HtmlToMarkdown.StructuredData (html_to_markdown v3.5.5)

Copy Markdown

Structured data block (JSON-LD, Microdata, or RDFa).

Represents machine-readable structured data found in the document. JSON-LD blocks are collected as raw JSON strings for flexibility.

Examples

let schema = StructuredData {
    data_type: StructuredDataType::JsonLd,
    raw_json: r#"{"@context":"https://schema.org","@type":"Article"}"#.to_string(),
    schema_type: Some("Article".to_string()),
};

assert_eq!(schema.data_type, StructuredDataType::JsonLd);

Summary

Types

t()

Structured data block (JSON-LD, Microdata, or RDFa).

Types

t()

@type t() :: %HtmlToMarkdown.StructuredData{
  data_type: String.t() | nil,
  raw_json: String.t() | nil,
  schema_type: String.t() | nil
}

Structured data block (JSON-LD, Microdata, or RDFa).