Closed Bug 1735676 Opened 4 years ago Closed 2 years ago

JSON Viewer: GeoJSON Support (Feature Request)

Categories

(DevTools :: JSON Viewer, enhancement)

Firefox 94
enhancement

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: som, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:94.0) Gecko/20100101 Firefox/94.0

Steps to reproduce:

Open a valid JSON file from the local filesystem with a .geojson extension

Actual results:

File opens as a text file; JSON Viewer does not kick in.

Expected results:

JSON Viewer should kick in. GeoJSON is a standardised extension of the JSON format and when correctly formatted can be expected to parse as valid JSON.

https://datatracker.ietf.org/doc/html/rfc7946#section-1

The Bugbug bot thinks this bug should belong to the 'WebExtensions::Untriaged' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Product: Firefox → WebExtensions
Component: Untriaged → JSON Viewer
Product: WebExtensions → DevTools

Works for me. Does your system properly associate .geojson with application/geo+json?

If you open the browser console and enter getMIMEService().getTypeFromExtension("geojson"), do you get "application/geo+json"?

(In reply to Oriol Brufau [:Oriol] from comment #2)

Works for me. Does your system properly associate .geojson with application/geo+json?

If you open the browser console and enter getMIMEService().getTypeFromExtension("geojson"), do you get "application/geo+json"?

It's MacOS Big Sur. The browser mime service throws for geojson ... so guessing not. Similarly the file type isn't available under Firefox preferences > general > applications .. not sure if that is useful / user configurable outside of download preferences.

On the system side, geojson is reported as "Geographical JSON" in the GUI (json shows "JSON"). The system mime type file $file --mime-type for each returns as text/plain.

This appears to be working on macOS Ventura and Firefox 117. Ventura reports "application/json" for geojson, the browser console correctly returns "application/geo+json" and the JSON viewer kicks in as expected.

Resolving as "works for me" ... thanks for the heads space.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.