Skip to content

Non-JSON MIME types #170

Open
Open
@multimeric

Description

@multimeric

I realise this has been discussed briefly at #13. However, we don't yet have a good solution.

The problem is this: I want my API to input and output data in both CSV and JSON format. When dealing with JSON I of course want to use the JSON API spec, and flask-rest-jsonapi should deal with that perfectly. The problem is, I don't want to duplicate all my code to also support CSV. I want the URLs, the schemas, and the models to be exactly the same as the JSON API. The only difference is that I want a hook that runs before loading and after dumping JSON data, when the Accept/Content Type header is csv, in order to convert to/from JSON. Is this possible?

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