Ticket #134 (closed defect: invalid)

Opened 5 years ago

Last modified 5 years ago

Nested lists seems to be "dumped" incorrectly

Reported by: maksims.juvcenko@… Owned by: xi
Priority: high Component: pyyaml
Severity: major Keywords: List; dump


Problem occurs, when nested list is dumped.

>>> s = {"a": ['aaa','bbb','ccc']}
>>> print yaml.dump(s, default_flow_style=False)
- aaa
- bbb
- ccc

According to specification of YAML 1.1 nested sequence items must have entry token equal to " -" (two spaces and minus symbol), but in reality it lacks entry spaces. This issue creates limitations, when YAML documents are passed between PyYAML and JYaml interpreters.


  • PyYAML version: PyYAML 3.08
  • Python version: 2.5.2


Change History

comment:1 Changed 5 years ago by xi

  • Status changed from new to closed
  • Resolution set to invalid

PyYAML output is correct, see, for instance, Examples 10.3 and 10.4 in the specification:

comment:2 Changed 5 years ago by py4fun@…

use SnakeYAML (instead of JYaml) for Java


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.