maplefu0602 / spyc

Automatically exported from code.google.com/p/spyc
MIT License
0 stars 0 forks source link

colons don't work in map keys eg :foo or foo:bar #58

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a document which has a colon in a map key, where the key isn't quoted.
2. Parse with Spyc::YAMLLoad
3. Dump resulting data structure and observe fail.

code is this:

    require_once "spyc.php";
    $data = Spyc::YAMLLoad('spyc.yaml');
    echo(var_dump($data));

where spec.yaml contains:

x:y: foo

What is the expected output? What do you see instead?

Would expect to see this:

array(1) {
  ["x:y"]=>
  string(3) "foo"
}

but see this:

array(1) {
  ["x"]=>
  array(1) {
    ["y"]=>
    string(3) "foo"
  }
}

What version of the product are you using? On what operating system?

0.5 on Debian.

Please provide any additional information below.

Original issue reported on code.google.com by tomjones...@gmail.com on 9 Sep 2013 at 3:44

GoogleCodeExporter commented 8 years ago
Please test this with the latest version of Spyc from github: 
https://github.com/mustangostang/spyc

If the bug still persists, please file a issue there.

Original comment by vlad.and...@gmail.com on 9 Sep 2013 at 4:02

GoogleCodeExporter commented 8 years ago
Tested with latest version and transcribed bug report to 
https://github.com/mustangostang/spyc/issues/24

Original comment by tomjones...@gmail.com on 9 Sep 2013 at 5:26