You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Census APIs which return data as JSON should take advantage of JSON's data typing. Numeric values should not be served with quotes. Take this API call, for instance:
As can be seen in this screenshot of a browser JSON viewer:
all values are quoted, and thus interpreted by JSON parsers as strings. However, the API documentation shows clearly that the predicateType for most of these variables is int.
By returning the numeric values without quotes, most JSON tools would parse the API response and return those as numeric values, saving API users from redundant work and making the real nature of the data more clear.
The text was updated successfully, but these errors were encountered:
Hi Joe! I think this is a bug. I also know that the team is aware of this, but might use a push from the users. If everyone who would like this feature could please upvote it and send an email to cedsci.feedback@census.gov (just copy/paste the issue copy), I will hope we can at least get an answer as to whether they are planning any fix. If you would also copy me at logan.t.powell@census.gov, I'd like to be in the loop.
Census APIs which return data as JSON should take advantage of JSON's data typing. Numeric values should not be served with quotes. Take this API call, for instance:
https://api.census.gov/data/timeseries/bds/firms?get=emp,estabs,estabs_entry,state,year,year2&for=state:*&time=from+1977+to+2014
As can be seen in this screenshot of a browser JSON viewer:
all values are quoted, and thus interpreted by JSON parsers as strings. However, the API documentation shows clearly that the
predicateType
for most of these variables isint
.By returning the numeric values without quotes, most JSON tools would parse the API response and return those as numeric values, saving API users from redundant work and making the real nature of the data more clear.
The text was updated successfully, but these errors were encountered: