Modify

Ticket #292 (new defect)

Opened 10 months ago

Quoted array/collection keys?

Reported by: libyaml@… Owned by: xi
Priority: low Component: libyaml
Severity: normal Keywords:
Cc:

Description

How come some array/collection keys are emitted in quotes, and, respectively, have to be in quotes to be parsed correctly?

Keys in question are, e.g.: n, no, y, yes (but not: ye, 3, m...)

I feel like there's pattern (which I couldn't find documentation of) and that I'm missing something here. I'm sorry if this is a dumb question.

I haven't encountered this behavior (which somewhat impacts "human writeability") in other parsers. Note: I use the PHP/PECL version 0.1.4:

echo yaml_emit(array('m'=>1,'yes'=>2));

result:

---
m: 1
"yes": 2
...

Attachments

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will be changed from xi. Next status will be 'new'
The owner will be changed from xi to anonymous. Next status will be 'assigned'
Author


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

 
Note: See TracTickets for help on using tickets.