majintao0131 / yaml-cpp

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

The emitter should output a more compressed format #61

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For example, a sequence of maps currently outputs as:

-
  name: Aaron Rodgers
  position: QB
-
  name: Greg Jennings
  position: WR

It would be nice if it outputted:

- name: Aaron Rodgers
  position: QB
- name: Greg Jennings
  position: WR

or at least have an option to choose between them. The reverse, I think,
should stay as-is. For example, I prefer

stooges:
  - Larry
  - Curly
  - Moe

YAML actually prohibits map-map inlining, so we must do

prices:
  computer: $400
  monitor: $150
  keyboard: $20

Finally, sequence-sequence inlining is legal, but kind of ugly. For
example, you can do

- - - - - foo
        - bar
    - baz
- woz

but it kind of looks silly. I'd rather have a newline after each.

But if anyone has a different opinion about the looks of any of these
options, please post here!

Original issue reported on code.google.com by jbe...@gmail.com on 3 Dec 2009 at 6:06

GoogleCodeExporter commented 9 years ago
Issue 72 has been merged into this issue.

Original comment by jbe...@gmail.com on 28 Oct 2010 at 9:04

GoogleCodeExporter commented 9 years ago
Fixed, r454. Hope this works well for everyone, sorry about the delay.

Original comment by jbe...@gmail.com on 3 Mar 2011 at 3:38