jakartaee / jakartaee/jsonb-api
@JsonbPropertyOrder in relation to inherited properties clarification
- Dominant language
- Java
- Stars
- 95
- Forks
- 41
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 35
Description
in [JSONB specification document](https://jcp.org/en/jsr/detail?id=367) 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:
```java
@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 [https://github.com/eclipse-ee4j/yasson/issues/228](https://github.com/eclipse-ee4j/yasson/issues/228)
Contributor guide
Research direction
Start with section 3.13 of the JSON-B specification and compare it with the @JsonbPropertyOrder example in this issue. Review the related yasson issue 228, then document the expected serialization order and clarify whether inherited properties are included or overridden; no implementation file or test is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100