wiki:YAMLColonInFlowContext

Version 2 (modified by xi, 8 years ago) (diff)

--

: in the flow context

It's not clear what is the best solution:

  1. Forbid ':' for plain scalars in the flow context and use it to separate keys from values. his syntax is more Python-compatible. For instance, it allows
        {1:2,2:3,3:5,4:7,5:11,6:13,7:17,8:23}    # prime numbers
    
  2. Allow ':' for plain scalars in the flow context provided it's not followed by a whitespace. Require ': ' to separate keys from values. This will allow unquoted time values and URLs in the flow context. For instance,
        [12:45, http://pyyaml.org/]    # Time and URL
    

What do you think? Please leave an excerpt of your document which produced an error here, in the wiki page.