LoginSignup
2

More than 3 years have passed since last update.

Java(JVM)でスネークケースのJSONをキャメルケースのフィールドに対応させる

Posted at

@JsonNamingを利用すればOK

@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
public class Hoge {
    private String hogeHoge; // hoge_hoge
    private String fooFoo; // foo_foo
    private String piyoPiyo; // piyo_piyo
}

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2