6.0.0-alpha10
5/14/25

[#6284] Support YAML literal documents
Summary Support YAML literal documents
Queue Horde Framework Packages
Queue Version HEAD
Type Enhancement
State Accepted
Priority 1. Low
Owners
Requester chuck (at) horde (dot) org
Created 02/18/2008 (6295 days ago)
Due
Updated
Assigned
Resolved
Milestone
Patch No

History
02/18/2008 10:30:28 PM Chuck Hagenbuch Comment #1
State ⇒ Accepted
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Support YAML literal documents
Queue ⇒ Horde Framework Packages
Reply to this comment
Explanation from Alexei Zakhlestin:



I noticed, that you limit yaml-documents only to the ones which 
provide arrays, which is not always true. yaml-document can consist of 
the single literal (string, null, number, etc) and still be valid. 
Currently, whenever syck_load() returns anything but array, you force 
result to be empty array().



Simple test-case:



<?php



require 'Horde/Yaml.php';



$doc = 'test';



var_dump(syck_load($doc));

var_dump(Horde_Yaml::load($doc));


Saved Queries