JSON Viewer: GeoJSON Support (Feature Request)
Categories
(DevTools :: JSON Viewer, enhancement)
Tracking
(Not tracked)
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.
Comment 1•4 years ago
|
||
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.
Updated•4 years ago
|
Comment 2•4 years ago
|
||
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.
Description
•