Skip to content

Empty string key in response body #98

Description

@mdesoto

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions