My favorites | Sign in
Logo
          
New issue | Search
for
| Advanced search | Search tips
Issue 1: "Page Info" window reports content type as text/html
  Back to list
Status:  Accepted
Owner:  ben.hollis
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by ben.hollis, Feb 24, 2009
What steps will reproduce the problem?
1. Open a JSON document like http://brh.numbera.com/experiments/crazy.json
2. Right click on the page and click "View Page Info".
3. "Type" displays as "text/html"

What is the expected output? What do you see instead?
It should say "application/json".

This is because JSONView is using a streamconverter to convert JSON to
HTML, so Firefox thinks it's HTML. Not sure how to fix.

Comment 1 by gabriel....@gmail.com, Oct 08, 2009
It does not solve, just a workaround.
It will still show text/html. but there will be a "meta tag" box bellow showing it 
"correctly" (ok, not so correct as we can't get the original one yet. but since we 
can't get other types anyway...)

jsonToHTML: function(json, callback, uri) {
	var output = '<META HTTP-EQUIV="Content-Type" CONTENT="application/json">';


also, not valid html as the meta is outside of the head. don't even know why i am 
suggesting this. consider brainstorming :)
Sign in to add a comment

Hosted by Google Code