One trick I've seen is people serving up application/json if the Accept header includes it, but otherwise, providing a html wrapper that pretty-formats the json. Can't remember where I've seen that, but it seemed a clever way to make a json UI a bit more user-friendly for dumb users.
Incidentally, what are people's thoughts on serving json based on the URL (i.e. ending in ".json") vs based on the Accept header (i.e. the Rails way)? - Korny On Mon, Feb 21, 2011 at 12:46 AM, Mike Bailey <[email protected]> wrote: > Thanks Phil! > > Aleks wrote to say he'd been toying with the idea of writing a JSON plugin > and was pleased to hear they're already available. > > http://mike.bailey.net.au/2011/02/json-in-your-web-browser/ > > <http://mike.bailey.net.au/2011/02/json-in-your-web-browser/>Would still > love to hear from more people with cool tricks for JSON. > > - Mike > > > On Mon, Feb 21, 2011 at 12:15 AM, Phil Oye <[email protected]> wrote: > >> On 20/02/2011, at 2:33 PM, Korny Sietsma wrote: >> >> > For *viewing* json, I like to use the browser, plus a plugin like >> JsonView (for Chrome): >> > >> https://chrome.google.com/extensions/detail/chklaanhfefbnpoihckbnefhakgolnmc >> > (it's a port of a Firefox plugin I haven't tried, but presumably it's >> also good: http://benhollis.net/software/jsonview/ ) >> >> I do the same thing, but in Safari. There's a sadly named plugin, called >> XML View, which formats JSON quite nicely. >> Incidentally, it is faster than the Chrome equivalent. With the latter I >> get a flash of raw JSON before it gets beautified. >> >> http://www.entropy.ch/software/MacOSX/xmlviewplugin/ >> >> p. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby or Rails Oceania" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/rails-oceania?hl=en. >> >> > -- > You received this message because you are subscribed to the Google Groups > "Ruby or Rails Oceania" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rails-oceania?hl=en. > -- Kornelis Sietsma korny at my surname dot com http://korny.info "Every jumbled pile of person has a thinking part that wonders what the part that isn't thinking isn't thinking of" -- You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rails-oceania?hl=en.
