Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

JsonRenderer creates malformed JSON #12

Open
GoogleCodeExporter opened this issue May 5, 2015 · 2 comments
Open

JsonRenderer creates malformed JSON #12

GoogleCodeExporter opened this issue May 5, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create data table
2. Use JsonRenderer.renderDataTable
3. Parse with strict JSON library

What is the expected output? What do you see instead?

I get invalid JSON. The keys are unquoted and values are in single quotes.
Keys and values must both be in double quotes.

What version of the product are you using? On what operating system?

1.0.2

Please provide any additional information below.

Even google.gadgets.io.makeRequest errors on the JSON this class produces.

Attached file works better. I think we are still in trouble with the way a
Date is included.

Original issue reported on code.google.com by bill.ku...@gmail.com on 9 Sep 2009 at 5:42

Attachments:

@GoogleCodeExporter
Copy link
Author

This issue was closed by revision r48.

Original comment by shu...@gmail.com on 21 Dec 2009 at 3:04

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Reopening this issue after reverting the fix.

Moving to real JSON results in up to 10% increase in the response size, mostly 
due to
adding quotes to the keys.
In addition to that, since the GViz client already supports both the current 
format
and real JSON, the only reason to move to real JSON is to allow reading of the 
GViz
response by clients other than GViz client.

In light of the above, the right approach may be to keep the current format by
default, but add a tqx flag in the request that signals the server side to 
return
real JSON.

Original comment by shu...@gmail.com on 31 Dec 2009 at 5:01

  • Changed state: Accepted

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant