Convert your Google Doc spreadsheets to JSON, in the browser. This is not an API method.
It is for you to work with your data in Google Spreadsheets, then copy out the resulting JSON conversion to paste somewhere.
Row 1 must dictate the type of data you have in that column: Supported Types:
string
(or just nothing at all. Values will be quoted and escaped)number
(data will attempt to be converted using parseFloat)dict
(data in cell as {"keyhere": "Value Here", ...})boolean
(true/false -- not specially handled, but just works)list
(data in cell as ["item 1", "item 2"...]. Double quotes mandatory)date
(sets date as timestamp in the SPREADSHEET timezone [set inFile
>Spreadsheet Settings
])
Row 2 must be the column headers.
Rows 3+ are your data.
Fork of code at http://code.google.com/p/pamelafox-samplecode/
GOOGLE APPS SCRIPT METHOD (PREFERRED)
- Format your data as per the above
- Go to
Tools
>Script Editor
- Paste the contents of
Code.gs
into the box. - Save, and run "readRows"
- A box will appear with the results
WIDGET METHOD (DEPRECATED)
- If using dates, set your target timezone in
File
>Spreadsheet Settings
- Format your data as per the above
- Highlight your columns
- Go to "Insert"->"Gadget" and choose Custom. Add url
https://raw.github.com/radicand/gsheet-to-json/master/gadget.xml
- Be sure to re-highlight your columns when prompted, if needed
- Enjoy!