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

Structure of object returned is different between csv and geojson output #54

Closed
frankinspace opened this issue Dec 6, 2023 · 0 comments · Fixed by #55
Closed

Structure of object returned is different between csv and geojson output #54

frankinspace opened this issue Dec 6, 2023 · 0 comments · Fixed by #55
Assignees
Labels
bug Something isn't working

Comments

@frankinspace
Copy link
Member

CSV output is structured like:

{
    "status": "200 OK",
    "results": "*STRING OF CSV CONTENT*"
}

geojson output is structured like:

{
    "status": "200 OK",
    "results": {
        "status": "200 OK",
        "time": "219.917 ms.",
        "type": "FeatureCollection",
        "features": [{*GEOJSON FEATURE OBJECT*}],
        "hits": 3
    }
}

The structure of the output should be the same for both format types. I would suggest something like

{
    "status": "200 OK",
    "time": "219.917 ms.",
    "hits": 3
    "results": {
        "csv": "*CSV FORMATTED DATA IF CSV REQUESTED, EMPTY STRING OTHERWISE*",
        "geojson": *DATA AS GEOJSON FEATURECOLLECITON IF GEOJSON REQUESTED, EMPTY OBJECT OTHERWISE*
    }
}
@frankinspace frankinspace added the bug Something isn't working label Dec 6, 2023
@frankinspace frankinspace moved this to 🔖 Ready in SOTO PI 23.4 Dec 6, 2023
@vggonzal vggonzal moved this from 🔖 Ready to 🏗 In progress in SOTO PI 23.4 Dec 6, 2023
@vggonzal vggonzal mentioned this issue Dec 6, 2023
4 tasks
@frankinspace frankinspace linked a pull request Dec 6, 2023 that will close this issue
4 tasks
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in SOTO PI 23.4 Dec 6, 2023
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
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants