benborgers / opensheet

💾 An API to get a Google Sheet as JSON, no authentication required.
https://opensheet.elk.sh
MIT License
632 stars 121 forks source link

Nested JSON? #15

Closed oneezy closed 2 years ago

oneezy commented 2 years ago

Does this support nested JSON objects also? If so, are there any examples of that?

benborgers commented 2 years ago

Sorry, I’m not sure what you mean — nested JSON in the request, or in the response? Where would nested JSON be used?

oneezy commented 2 years ago

I was curious if the Google Sheet could be written in such a way that it could return a nested json response i.e. something like this...

{
  "name": "Oneezy",
  "url": "https://oneezy.com",
  "author": {
    "name": "Justin O'Neill",
    "email": "hello@oneezy.com",
    "url": "https://oneezy.com",
    "avatar": "https://avatars0.githubusercontent.com/u/1409898?s=460&v=4"
  },
  "social": {
    "facebook": "https://www.facebook.com/oneeeezy/",
    "twitter": "https://twitter.com/oneeezy",
    "instagram": "https://www.instagram.com/oneeeezy/",
    "linkedin": "https://www.linkedin.com/in/oneezy/",
    "github": "https://github.com/oneezy"
  }
}
benborgers commented 2 years ago

Ahh unfortunately there’s no way to get that kind of response. The values in the API response are all either strings or integers.