Jackson and some common notes (backup)

Source: Internet
Author: User

    • Jackson Basic Information

The Jackson Library (http://jackson.codehaus.org) is a Java-based, open source JSON format parsing tool with 3 jar packages throughout the library:

      1. The jackson-core.jar--core package (required) provides an API based on "stream mode" parsing.
      2. The jackson-databind--data binding package (optional) provides APIs based on the object binding and tree model.
      3. jackson-annotations--Annotation Package (optional), provides annotation functionality.
    • Common annotations

@JsonIgnore This annotation is used on properties or methods, and is ignored when the JSON operation is performed.

@JsonIgnoreProperties This annotation is used for class annotations, where JSON serialization ignores some properties in the Java bean, and if it is a proxy class, it can be marked on the class declaration that the serialization and deserialization are affected because it cannot be marked on a property or method.

@JsonPropertyOrder comments in the class declaration, the effect is to sort the attributes.

@JsonFormat This annotation is used on attributes to convert the date type directly to the desired format, such as @jsonformat (pattern = "Yyyy-mm-dd hh-mm-ss").

@JsonProperty This annotation is used on attributes to serialize the name of the property to another name, such as serializing the Truename property to name, @JsonProperty ("name").

   @JsonSerialize Serialization.

@JsonDeserialize deserialization.

Jackson and some common comments (backup)

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.