Directly using the sublime Text implementation: HTTP access url+ formatted JSON string returned

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.