The following YAML input
try: {a: 1, b: 2, c: 3}
should be equivalent to
try:
a: 1
b: 2
c: 3
This behavior is expected from some users for the same reason that
timesteps: [1, 2, 3, 4, 5]
is equivalent to
timesteps:
- 1
- 2
- 3
- 4
- 5
The code currently throws the following error when parsing try: {a: 1, b: 2, c: 3}:
unexpected YAML map value type v for key "try"
Readability for some input files can be improved by using this standard shortcut version of mappings. For example,
Fields: {rho: 0.125, px: 0., py: 0., pz: 0., rho_E: 0.25}
is easier for many people to read and write compared to the following
Fields:
rho: 0.125
px: 0.
py: 0.
pz: 0.
rho_E: 0.25
This is especially helpful for long and complicated input files as it helps limit the total number of input lines.
The short version of YAML maps should be parsed correctly or the documentation should explain why it isn't supported.
@trilinos/teuchos @ibaned
Thanks @danielsjensen1 for pointing this out! Also thanks to @mhoemmen for making sure it showed up in my inbox. This is an oversight on my part, and I've developed a fix in PR #3028.
@danielsjensen1 the fix is in the develop branch, please let me know if it works for you. Thanks!
Everything is being parsed properly now with your fix. Thanks for taking care of this so fast!