Skip to content

JSON handling for non application/json content types #3

Closed
@fivesixzero

Description

@fivesixzero

Some useful REST endpoints don't return with a content-type of application/json while still returning valid JSON, preventing the use of the library's built-in JSON parsing/processing.

I ran into this while working with the freely available US National Weather Service forecast API, which can only respond with GeoJSON (application/geo+json) or JSON LD (application/ld+json).

As a workaround in my project I've just called directly into the MagTag object's network.fetch_data(url) to get a response string to parse and wrangle but it'd be nice to do it in a more elegant way with these types of endpoints.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions