Skip to content

Not apply transient if field had getter #86

@caoli5288

Description

@caoli5288
public class Main {

    public static class T {

        public transient int i;

        public int getI() {
            return i;
        }
    }

    public static void main(String[] input) {
        System.out.println(JsonStream.serialize(new T()));
    }
}

Output

{"i":0}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions