How to quickly build JavaBean objects from JSON (Intellij Idea-->gsonformat Tutorial)

Source: Internet
Author: User

and Third-party docking, The return to our JSON time parameter field is very common phenomenon, so we manually to create JavaBean is certainly to spend a lot of time, bloggers found many kinds of online, can be automatically generated by JSON JavaBean tools, Here's a quick introduction to the plugin Gsonformat in IntelliJ Idea.

1. What is Gsonformat

Converts the JSON data format to the JavaBean Object's as Plug-in.

2. Shortcut key ctrl+alt+s, or Settings-->plugins-and input Gsonformat install Plugins

Installation is complete, restart IntelliJ idea can, first need the new class file, and then press the key Alt+insert check gsonformat, or shortcut key alt+s, pop-up box input string data in JSON Format.

3, with Gson

<dependency>    <groupId>com.google.code.gson</groupId>    <artifactid>gson</ artifactid>    <version>2.8.  0</version></dependency>

How to quickly build JavaBean objects from JSON (Intellij Idea-->gsonformat Tutorial)

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.