class Lutaml::Yaml::Adapter::StandardAdapter

def self.parse(yaml, _options = {})

def self.parse(yaml, _options = {})
  YAML.safe_load(yaml, permitted_classes: PERMITTED_CLASSES)
end

def to_yaml(options = {})

def to_yaml(options = {})
  # Handle KeyValueElement input (new symmetric architecture)
  attributes_to_serialize = if @attributes.is_a?(Lutaml::KeyValue::DataModel::Element)
                              # Unwrap __root__ wrapper to get actual content
                              @attributes.to_hash["__root__"]
                            else
                              # Legacy Hash input (backward compatibility)
                              @attributes
                            end
  YAML.dump(attributes_to_serialize, options)
end