Skip to content

Fastjson

EasyYapi supports Alibaba Fastjson annotations for field name mapping.

Extension Config

properties
# Fastjson support (disabled by default)
field.name=@com.alibaba.fastjson.annotation.JSONField#value

WARNING

Fastjson support is disabled by default. Enable it in IDE settings if needed.

Supported Annotations

AnnotationRuleDescription
@JSONFieldfield.nameUse the specified name instead of the field name

Example

java
public class User {
    @JSONField(name = "user_name")
    private String name;
}

In this example, name will be documented as user_name.

Released under the Apache-2.0 License.