Comments (25)
As noted in the Google Code issue, the pattern application/*+json
would cover a lot of the use cases (notably application/vnd.*+json
and application/prs.*+json
).
Of course, the browsers may or may not currently support registering a handler for patterns, so this ticket is more of a placeholder until they do :-(
from jsonview.
Thanks for the note, and that would be nice, but I'm unaware of any way to register content-handlers for MIME type patterns in Firefox. If anyone figures out a way, I'd appreciate a pull request.
from jsonview.
Is it possible to use JSONView with Open in Browser plugin? I think such integration will solve most of issues.
from jsonview.
text/json would definitely be appreciated
from jsonview.
Why are you serving text/json? It's not the right mime type for json.
On Jul 8, 2012, at 10:08 AM, BrianARice
[email protected]
wrote:
text/json would definitely be appreciated
Reply to this email directly or view it on GitHub:
#7 (comment)
from jsonview.
because, for some bizarre reason, inside an iframe, inside IE 8(?), inside an ajax call... when I return application/json... it tries to download a file... but, it seems not to with text/json... so, at the moment... my server code says if it's firefox return application/json (so this thing works)... otherwise application/json... so it would be nicer to just have this thing work with a few non-standard and/or user defined mime types.
from jsonview.
Gotcha. The way I'd like to see this feature implemented in JSONView is as a list of MIME types in a list in the JSONView options. Initially it would be populated with only "application/json", but people could add more types as they require.
from jsonview.
SOLR at least until 3.5 returns "text/plain" for a json response. It would be handy if jsonview would accept a list of urls that it should handle the display for -- I have a set list of SOLR servers that I hit all the time. Is there another way to do this? It is really annoying to see a long string of text when I'm used to jsonview's goodness.
from jsonview.
@cwilkes as I said above, I'd like to just have JSONView be customizable to accept whatever crazy MIME types you want.
from jsonview.
Sometimes, some servers (probably wrongly configured) use exotics Mime Types. So it will be nice to be able to add some other Types, like text/json
.
Furthermore, having a menu entry to See with JSONView will be great when the content is text/plain
(because this Mime Type is sometimes JSON, often something else, so adding it in the Options is non-sense).
from jsonview.
Yes, that is indeed what this feature request is about.
The second part, about forcing a page to render as JSON from a menu, is #5.
from jsonview.
Sorry to file the dupe. But I don't think you should just make JSONView configurable to support alternative mime-types. JSONView should recognize application/*+json as JSON - because that's what the mime type says it is. The burden shouldn't be on individual users to add each one they come across.
from jsonview.
If you can figure out how to get Firefox to recognize wildcard mime types,
please let me know. I've never been able to do it.
-Ben
Sent from my phone
On Oct 14, 2013, at 8:41 AM, Eric Mill [email protected] wrote:
Sorry to file the dupe. But I don't think you should just make JSONView
configurable to support alternative mime-types. JSONView should recognize
application/*+json as JSON - because that's what the mime type says it is.
The burden shouldn't be on individual users to add each one they come
across.
—
Reply to this email directly or view it on
GitHubhttps://github.com//issues/7#issuecomment-26264738
.
from jsonview.
OK, then better idea - if you need to catch explicit mime type strings, how about extracting the list of mime types you catch to a single text file in this repo? Then, people can start contributing mime types as they find them. That way, when annoying people like me start ragging on you, you point them at the file and tell them to click the "Edit" button.
from jsonview.
I think that is a good compromise.
from jsonview.
Sounds good for application/json+*
, feel free to send a PR.
from jsonview.
I'm new to Firefox extensions - I cloned the repo and grepped through mentions of application/json
, but there's a lot. Would it be easy enough for you to extract the core uses of application/json
out to a text file with just one entry? Or to give me a clue as to where to start myself?
from jsonview.
I'm actually not sure myself how to do it - Currently the thing that makes it work is some combination of this line: https://github.com/bhollis/jsonview/blob/master/src/chrome.manifest#L23 and this one https://github.com/bhollis/jsonview/blob/master/src/components/jsonview.js#L210 - I remember that this was related to some change in Firefox at some point, so I don't remember whether both or needed or if it's just one or the other. I also don't know how to programmatically add contracts if it's really coming from the chrome.manifest
(which I think it is). I know there's an API now for it, but it may require completely re-doing how JSONView is initialized and registered (by changing it to a new-style bootstrapped extension).
from jsonview.
Wow, okay. Writing an old-style Firefox extension looks like not a lot of fun. It does look like this is best done as part of a larger refactor into a new-style HTML/CSS/JS based extension.
Sounds like a fun project, maybe I'll learn how to do it. Do you think JSONView could be done as a new-style extension?
They have a migration guide and an old vs new breakdown. The tabs API has an experimental contentType
property that says:
Returns the MIME type that the document currently loaded in the tab is being rendered as. This may come from HTTP headers or other sources of MIME information, and might be affected by automatic type conversions performed by either the browser or extensions. This property is read-only.
from jsonview.
+1, this is really needed with hypermedia APIs approaching - a lot of new JSON mimetypes appear:
application/vnd.collection+json
application/vnd.hal+json
application/vnd.siren+json
application/vnd.mason+json
- ...
from jsonview.
Again, I have no argument that this would be a good feature to implement, and I would be happy to look at a pull request from somebody who did so.
from jsonview.
How straightforward would a rewrite as a new-style Firefox extension be? Could it share much code with the popular Chrome extension's code?
from jsonview.
text/json still seems to be unsupported.
from jsonview.
Yes, that is by design. Please read the rest of the issue.
On Jan 22, 2015, at 9:41 AM, Eduard [email protected] wrote:
text/json still seems to be unsupported.
�
Reply to this email directly or view it on GitHub.
from jsonview.
This will be in the upcoming JSONView 1.0 release.
from jsonview.
Related Issues (20)
- Add toggle/option to have a dark background (dark theme) HOT 2
- not working for iframes HOT 1
- Firefox Save Page As... saves rendered HTML instead of original JSON HOT 2
- add font size to options menu HOT 9
- Add a configuration to avoid word-wrap
- Add support for Content-Type: application/vnd.spring-boot.actuator.v3+json HOT 1
- With kerberos auth json view doesn't render json HOT 1
- Copy json loses indention HOT 6
- The extension doesn't work HOT 2
- AWS Console usage triggers JsonView trying to parse an HTML page in error HOT 1
- Migrate to Manifest V3
- Wrong character instead of triangle pointing down HOT 20
- Error handling response: TypeError: Cannot read properties of undefined (reading 'textContent') HOT 4
- version 2.5.0 - jsonview not displaying HOT 6
- Extension causes JSON parse error when loading SharePoint page HOT 18
- AMO page's description outdated HOT 3
- Support .jsonc files? HOT 3
- Unexpected non-whitespace character after JSON at position 256 (line 1 column 257) HOT 4
- inserts double quotes HOT 1
- JSON number is being truncated as if it was an integer HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsonview.