Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#16546 closed enhancement (fixed)

Support Overpass API JSON format

Reported by: Don-vip Owned by: team
Priority: normal Milestone: 18.08
Component: Core Version:
Keywords: overpass api download json Cc:


There is some discussion about adding JSON format output for the OSM API.

It may be possible that the format matches Overpass API JSON.

We should start by supporting this format. Currently we force XML output in OverpassDownloadReader:

     * Fixes Overpass API query to make sure it will be accepted by JOSM.
     * @param query Overpass query to check
     * @return fixed query
     * @since 13335
    public static String fixQuery(String query) {
        return query == null ? query : query
                .replaceAll("out( body| skel| ids)?( id| qt)?;", "out meta$2;")
                .replaceAll("(?s)\\[out:(json|csv)[^\\]]*\\]", "[out:xml]");

Attachments (0)

Change History (5)

comment:1 Changed 4 years ago by Don-vip

Milestone: 18.08

comment:2 Changed 4 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 14086/josm:

fix #16546 - Support Overpass API JSON format

comment:3 Changed 4 years ago by Don-vip

In 14087/josm:

see #16546 - fix error-prone violation

comment:4 Changed 4 years ago by Don-vip

In 14088/josm:

see #16546 - simplify exception chaining to keep existing unit tests as it

comment:5 Changed 4 years ago by Don-vip

In 14090/josm:

see #16546 - fix unit test

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.