Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 56701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:34:32+00:00 2026-05-10T17:34:32+00:00

I have a web service that uses Python’s SimpleJSON to serialize JSON, and a

  • 0

I have a web service that uses Python’s SimpleJSON to serialize JSON, and a javascript/ client that uses Google’s Visualization API. When I try to read in the JSON response using Google Data Table’s Query method, I am getting a ‘invalid label’ error.

I noticed that Google spreadsheet outputs JSON without quotes around the object keys. I tried reading in JSON without the quotes and that works. I was wondering what was the best way to get SimpleJSON output to be read into Google datable using

query = new google.visualization.Query('http://www.myuri.com/api/').

I could use a regex to remove the quotes, but that seems sloppy. The javascript JSON parsing libraries I’ve tried won’t read in JSON syntax without quotes around the object keys.

Here’s some good background reading re: quotes around object keys:

http://simonwillison.net/2006/Oct/11/json/.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:34:33+00:00Added an answer on May 10, 2026 at 5:34 pm

    Are you certain the Google API is expecting JSON? In my experience Google’s APIs tend not to be massively broken in a manner you’re describing — it could be that they’re actually expecting a different format that merely resembles JSON.


    Further poking around reveals instructions for retrieving data in the format Google expects:

    For example, to get the dataSourceUrl from a Google Spreadsheet, do the following:

    1. In your spreadsheet, select the range of cells.
    2. Select ‘Insert’ and then ‘Gadget’ from the menu.
    3. Open the gadget’s menu by clicking on the top-right selector.
    4. Select menu option ‘Get data source URL’.

    I did this and opened the URL in my browser. The data it was returning was certainly not JSON:

    google.visualization.Query.setResponse( {requestId:'0',status:'ok',signature:'1464883469881501252', table:{cols: [{id:'A',label:'',type:'t',pattern:''}, {id:'B',label:'',type:'t',pattern:''}], rows: [[{v:'a'},{v:'h'}],[{v:'b'},{v:'i'}],[{v:'c'},{v:'j'}],[{v:'d'},{v:'k'}],[{v:'e'},{v:'l'}],[{v:'f'},{v:'m'}],[{v:'g'},{v:'n'}]]}}); 

    It looks like the result is intended to be directly executed by the browser. Try modifying your code to do something like this:

    # old return simplejson.dumps ({'requestId': 1, 'status': 'ok', ...})  # new json = simplejson.dumps ({'requestId': 1, 'status': 'ok', ...}) return 'google.visualization.Query.setResponse(%r);' % json 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 68k
  • Answers 68k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer If this is running on a server, a service seems… May 11, 2026 at 12:12 pm
  • added an answer We had the same problem, the only solution we found… May 11, 2026 at 12:12 pm
  • added an answer As far as I'm aware, there is currently no API… May 11, 2026 at 12:12 pm

Related Questions

I have a web service that uses Python's SimpleJSON to serialize JSON, and a
I have a winform application that uses some referenced web services to get data.
I have a web-service that I will be deploying to dev, staging and production.
I have a web service that I created in C# and a test harness
I have a web service that queries data from this json file, but I
I have a web service that is protected by requiring the consuming third party
I have a web service that needs different settings for different environments (debug, test,
I have a web service that I can only hit if I'm logged into
Pretty simple scenario. I have a web service that receives a byte array that
I have a web service class that the rest of the framework depends on

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.