struct

Anthropic::Content::UnknownData

Inherits Anthropic::Content::Data < Struct < Value < Object

Unknown content data for forward compatibility. Preserves unknown content types without failing parsing.

NOTE: The content_type method returns Type::Text as a safe default to satisfy the Data protocol contract. This value is NOT used for JSON serialization—the actual type from type_string is written instead via the custom to_json method.

Constructors

new(type_string : String, raw : JSON::Any)
Source

Instance methods

content_type

Returns Type::Text as a safe default value.

This satisfies the Data protocol contract but is NOT used for JSON serialization. The actual type string is preserved in type_string and written directly via to_json.

Source
to_content_json(json : JSON::Builder) : Nil
Source
to_json(json : JSON::Builder) : Nil
Source
type_string
Source