Skip to content

Conversation

@k-yle
Copy link
Collaborator

@k-yle k-yle commented Dec 10, 2025

We can remove almost all the XML parsing code by using the OSM API's json endpoints. Deleted about 250 lines of code.

We already use the new JSON endpoints for most things. This PR migrates the last few endspoints:

  • GET /api/capabilities.json
  • GET /api/0.6/notes.json
  • GET /api/0.6/notes/{id}.json
  • POST /api/0.6/notes/{id}/{action}.json
  • GET /api/0.6/changesets.json

This is faster, simpler, and makes the code more concise.

The last remaining endpoint that doesn't support JSON is uploading changesets, which is tracked by openstreetmap/openstreetmap-website#5973

affected parts of the UI:
  • in the changeset upload panel: the comment dropdown
  • view notes + view note comments
  • create note
  • close note
  • reopen note
  • comment on note
  • search for note by ID
  • (imageryBlocklist)
  • (max nodes per way)
  • API online/offline status

except changesets, which don't support JSON yet
@k-yle k-yle added the chore Improvements to the iD development experience or codebase label Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Improvements to the iD development experience or codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants