Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Empty string key in response body #98

Open
mdesoto opened this issue May 2, 2021 · 0 comments
Open

Empty string key in response body #98

mdesoto opened this issue May 2, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mdesoto
Copy link

mdesoto commented May 2, 2021

Describe the bug
Some keys are empty strings, and this can cause some JSON parsers to choke.

"images": {
    "": [
        {
          "id": 3544269,
          "image_url": "https://d2seqvvyy3b8p2.cloudfront.net/2d02a973edb37ab31f37e2309a05014c.jpg",
          "copyright": "© copyright of the Board of Trustees of the Royal Botanic Gardens, Kew."
        }
      ]
}

To Reproduce

https://trefle.io/api/v1/species/101119

Expected behavior
I would expect that every key would have a name. There may be a reason this is not the case. If there is, it would be good to see that reason articulated in the docs.

Additional context
I've seen this in a few places.

@mdesoto mdesoto added the bug Something isn't working label May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants