Skip to content

@JsonbPropertyOrder in relation to inherited properties clarification #119

Open
@bravehorsie

Description

@bravehorsie

in JSONB specification document section 3.13, it is required that properties from parent classes are serialized first.

@JsonbPropertyOrder annotation is declared on a TYPE. Should it include properties from parent class and override statement from 3.13?

Given example:

@JsonbPropertyOrder("b","a")
class A {
  public String a;
  public String b;
}

@JsonbPropertyOrder("c","d","a","b")
class B extends A {
  public String c;
  public String d;
}

What should be result of serialization instance of type B? Can the spec be clear on this behavior?

Related to eclipse-ee4j/yasson#228

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationInvolves the spec or javadocsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions