Current section

Files

Jump to
html_to_markdown lib html_to_markdown structured_data.ex
Raw

lib/html_to_markdown/structured_data.ex

# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:4ba300ecbb725eb266bbcd4f47e9bc50e560372ba8b6f9d9f93c785e8758cdc8
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule HtmlToMarkdown.StructuredData do
@moduledoc """
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);
```
"""
@typedoc "Structured data block (JSON-LD, Microdata, or `RDFa`)."
@type t :: %__MODULE__{
data_type: String.t() | nil,
raw_json: String.t() | nil,
schema_type: String.t() | nil
}
defstruct data_type: :json_ld,
raw_json: nil,
schema_type: nil
end