Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 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:

Description

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 by Don-vip, 6 years ago

Milestone: 18.08

comment:2 by Don-vip, 6 years ago

Resolution: fixed
Status: newclosed

In 14086/josm:

fix #16546 - Support Overpass API JSON format

comment:3 by Don-vip, 6 years ago

In 14087/josm:

see #16546 - fix error-prone violation

comment:4 by Don-vip, 6 years ago

In 14088/josm:

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

comment:5 by Don-vip, 6 years ago

In 14090/josm:

see #16546 - fix unit test

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.