iD
iD copied to clipboard
use JSON instead of XML for (almost) all OSM APIs
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 https://github.com/openstreetmap/openstreetmap-website/pull/5973
affected parts of the UI:
- in the changeset upload panel: the
commentdropdown - 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