Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Call me naive or quote xkcd, but whenever I read about the shortcomings of YAML, I daydream about a new standard that's mostly a subset of YAML, that looks like this:

    rules:
     - "All strings must be quoted and are parsed identically to JSON strings"
     - "true and false are the only boolean values"
     - """multiline strings
    are allowed"""
     - """|
       there can even be special multiline string types
       to indicate things like "dedent every line and 
       trim the beginning and end lines if empty
       """
     # Comments are allowed!
     - Number syntax just like JSON
    
    better_than_yaml: true
    "a number with multiword key": 1e9
    nesting:
      present: true
      difficult: false
It has the ease of coding of yaml, maps 1:1 with json (so can easily be re-serialized to json or yaml if needed), is familiar to folks who know yaml, and supports comments. And it eliminates ambiguous parses and gotchas, references, tags/directives, and other complexities.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: