Skip to content

Instantly share code, notes, and snippets.

@micahgodbolt
Last active January 20, 2017 08:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save micahgodbolt/757f9a9b2dfaed37bea5344761ccfbc4 to your computer and use it in GitHub Desktop.
Save micahgodbolt/757f9a9b2dfaed37bea5344761ccfbc4 to your computer and use it in GitHub Desktop.

Nested Yaml

props:
  BUTTON:
    BACKGROUND:
      value: blue
    COLOR:
      value: white 
    HOVER:
      BACKGROUND:
        value: blue
      COLOR:
        value: gray

Nested Yaml No Caps

props:
  button:
    background:
      value: blue
    color:
      value: white 
    hover:
      background:
        value: blue
      color:
        value: gray

Flat Yaml

props:
  BUTTON_BACKGROUND:
    value: blue
  BUTTON_COLOR:
    value: white 
  BUTTON_HOVER_BACKGROUND:
    value: blue
  BUTTON_HOVER_COLOR:
    value: gray

Flat JSON

{
  "props": {
    "BUTTON_BACKGROUND": {
      "value": "blue"
    },
    "BUTTON_COLOR": {
      "value": "white"
    },
    "BUTTON_HOVER_BACKGROUND": {
      "value": "blue"
    },
    "BUTTON_HOVER_COLOR": {
      "value": "gray"
    }
  }
}

Flat Json w/ Inline Values

{
  "props": {
    "BUTTON_BACKGROUND": {"value": "blue"},
    "BUTTON_COLOR": {"value": "white"},
    "BUTTON_HOVER_BACKGROUND": {"value": "blue"},
    "BUTTON_HOVER_COLOR": {"value": "gray"}
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment