-
Notifications
You must be signed in to change notification settings - Fork 971
JSON support for /changeset/:id/download #5970
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
Comments
Browsers can parse both xml and json natively. |
true, but it doesn't work in nodejs, so you can't reuse the same code in the browser and node. It's also extremely cumbersome to parse and generate xml, and you lose all the typesafety benefits from the JS/TS ecosystem |
Changeset download in XML format is currently being served by https://github.com/zerebubuth/openstreetmap-cgimap. That's where the productive implementation for JSON format would have to go as well. It doesn't mean that this issue isn't necessary. It's still required for the reference implementation. |
would it make sense to implement it here first, and then port it to cgimap? I assume that the idealistic outcome is an identical implementation in ruby and c++ |
I would start in this repo with a json version of app/views/api/changesets/downloads/show.xml.builder and additional render format in app/controllers/api/changesets/downloads_controller.rb, then add some test cases. |
Problem
Description
Over the years, JSON support has gradually been added to most APIs.
Uploading & downloading changesets are one of the few APIs that are still XML-only.
I imagine we could just create
/changeset/:id/download.json
to match/changeset/:id/download
. The JSON format would be the same as what zerebubuth/openstreetmap-cgimap#407 is proposing1Screenshots
No response
Footnotes
specially, a single array with
"action": "create" | "modify" | "delete"
instead of the 3 arrays forcreate
,modify
,delete
which is more similar to the current XML format. ↩The text was updated successfully, but these errors were encountered: