Background: As an Android app developer, you often encounter the following scenario: The backend server gives an interface URL, the returned data type is JSON, and we want to look ahead to the JSON data returned by this interface. The general view is to open the URL through a browser and then use some JSON viewing tools, such as Chrome+jsonview. And it's always a little low, and now we can just do it with a text editor: Sublime text. This article is only tested in Windows, and Mac and Linux users are asked to fine-tune their systems.
First, we need to install two plugins on sublime text: HTTP requester and pretty JSON(as for classmates who don't know how to install plugins, You can search by yourself).
If we have such an interface URL:
Http://api.openweathermap.org/data/2.5/forecast/daily?q=94043&mode=json&units=metric&cnt=7
When we paste into sublime text, press the shortcut key:Ctrl + Alt + ROr select from the right mouse button menu:HTTP Requester, the HTTP Response is displayed in a new tab,
And this JSON string is very unfriendly, so this time to use:pretty JSON This plugin, we select the string, and then press the shortcut:Ctrl + Alt + j, the string will be formatted into a more friendly format ,
Just so much, haha:)
Directly using the sublime Text implementation: HTTP access url+ formatted JSON string returned