Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

FR: Serve numeric data as numbers (without quotes) #5

Open
JoeGermuska opened this issue Aug 11, 2020 · 1 comment
Open

FR: Serve numeric data as numbers (without quotes) #5

JoeGermuska opened this issue Aug 11, 2020 · 1 comment
Labels
bug Something isn't working enhancement New feature or request

Comments

@JoeGermuska
Copy link

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:
image

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.

@loganpowell loganpowell added bug Something isn't working enhancement New feature or request labels Aug 26, 2020
@loganpowell
Copy link
Member

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants