Skip to content

Instantly share code, notes, and snippets.

@drusepth
Last active August 11, 2020 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drusepth/9947b3df84379dc93c0fec8ae44da560 to your computer and use it in GitHub Desktop.
Save drusepth/9947b3df84379dc93c0fec8ae44da560 to your computer and use it in GitHub Desktop.
# Categories returned as a keyed hash, making for fast reference (e.g. response.categories.Overview)
"categories": {
"Overview": {
"fields": [
{
"id": 123,
"label": "Description",
"value": "Some Description"
},
{
"id": 124,
"label": "Another Field",
"value": "Some other value"
},
...
],
},
...
},
### or
# Categories as an array, making for easier iteration and less chance of name collisions
"categories": [
{
"label": "Overview",
"fields": [
{
"id": 123,
"label": "Description",
"value": "Some Description"
},
{
"id": 124,
"label": "Another Field",
"value": "Some other value"
},
...
],
},
...
],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment