perl yaml error
"Hugo Cornelis" <[email protected]>
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <[email protected]> |
Hi,
If I run the following yaml through the perl yaml parser I get an error:
syn10- spine PF 13:
-
- 6.38091
- 7.73471
perl -e 'use YAML "LoadFile"; my $a = LoadFile("1.yml")'
YAML Error: Invalid element in map
Code: YAML_LOAD_ERR_BAD_MAP_ELEMENT
Line: 1
Document: 1
at /usr/local/share/perl/5.8.7/YAML.pm line 33
If I remove the 'dash' from the key, or when I quote the key, the
error disappears.
This yaml has been generated using the same perl module. So, I guess,
this is a bug in the emitter or in the loader, but I am not sure in
which of the two.
Do I have to quote the key name, like "syn10- spine PF 13" ?
Also, on ypaste it works without error, it has ID 8. So this seems to
say that this is correct yaml and it is a bug in the loader.
Hugo
--
Hugo Cornelis Ph.D.
Research Imaging Center
University of Texas Health Science Center at San Antonio
7703 Floyd Curl Drive
San Antonio, TX 78284-6240
Phone: 210 567 8112
Fax: 210 567 8152
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/