New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nillable customizations ignore default rules for processing classes #39

m0mus opened this Issue Aug 30, 2017 · 1 comment


None yet
1 participant
Copy link

m0mus commented Aug 30, 2017

If JsonbNillable annotation is present on a class or jsonb engine is created with withNullValues(true) setting, private and static fields are present in the target JSON document with 'null' values regardless of the actual value they have. According to the spec, private and static fields must be ignored.


public class Person {
    private String name;
    private String profession;
    private String testField = "privateField";
    public static String staticField = "staticField";

    public Person() {

    public String getName() {
        return name;

    public void setName(String name) { = name;

    public String getProfession() {
        return profession;

    public void setProfession(String profession) {
        this.profession = profession;

Result of serialization:

    "name": "Jason",
    "profession": "Argonauts Leader",
    "privateField": null,
    "staticField": null

@m0mus m0mus added the bug label Aug 30, 2017

@m0mus m0mus added this to the 1.0.1 milestone Aug 30, 2017

@m0mus m0mus self-assigned this Aug 30, 2017

m0mus added a commit that referenced this issue Aug 30, 2017

#39 - Fixed: nillable customizations ignore default rules for process…
…ing classes

Signed-off-by: Dmitry Kornilov <>

This comment has been minimized.

Copy link
Member Author

m0mus commented Aug 30, 2017


@m0mus m0mus closed this Aug 30, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment