First, the problem is reproduced:
I need the browser to output JSON data, but the browser pops up a File Save dialog box, this experience is a bit bad. So how to let the browser output to the browser directly above the page, and the format of the output, can also be edited.
Test data:
http://www.tuling123.com/openapi/api?key=3c37f0f528423a077a212e824d75d1e1&info=%E6%98%8E%E5%A4%A9%E5%8C%97 %e4%ba%ac%e9%a3%9e%e6%8b%89%e8%90%a8%e7%9a%84%e9%a3%9e%e6%9c%ba
http://www.tuling123.com/openapi/api?key=3c37f0f528423a077a212e824d75d1e1&info=%E6%98%8E%E5% A4%a9%e5%8c%97%e4%ba%ac%e9%a3%9e%e6%8b%89%e8%90%a8%e7%9a%84%e9%a3%9e%e6%9c%ba
Second, the application scenario
With the development of AJAX applications, it is becoming increasingly popular to communicate in JSON format and encapsulate JavaScript objects. There are now more and more sites release the development of the API, usually using JSON format for data transmission, compared to XML, JSON format is more simple, more readable.
And when the website specifies that the data return format is Application/json format, Firefox prompts the user to download the view, this is very inconvenient for the development of this kind of website application.
One option, of course, is to use Firebug for debugging. But for developers who develop mashup applications, it is often important to open the API connection provided by a third-party service to view the data format directly, in which case the jsonview extension will be more satisfying.
(1) Jsonview
http://mozilla.com.cn/thread-30295-1-1.html Download plugin.
With the Jsonview extension, JSON-formatted data is more beautiful to display, and it provides a folding expansion pattern similar to the XML document, allowing you to examine the local data. The entire JSON data becomes very neatly formatted, and the fault tolerance is very good.
To experience this, after installing the Jsonview extension, you can try to access the JSON data provided by the extension author,
But restart the browser, but still not, or the original effect.
(2) Json-handle
Keep looking: JSON plugin
Installing json-handle:https://addons.mozilla.org/zh-cn/firefox/addon/json-handle/
Restart the browser, or the original one.
(3) Jsonovich
After this restart, several plug-ins work with each other, can be edited, formatted, and so on.
The effect is as follows:
Big announcement into.
How to get Firefox to input JSON data instead of pop-up File Save dialog box?