Last active
November 18, 2018 15:48
-
-
Save gtudan/fe1fe4e005b8fc24e5cbe8ed497895f9 to your computer and use it in GitHub Desktop.
Customizing JSON-B using annotations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.json.bind.annotation.*; | |
public class Greeting { | |
@JsonbProperty("greeting") // name this field "greeting" in json | |
private String message; | |
@JsonbTransient // hide this field | |
private LocalDate created; | |
/* ... */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment