property order in subclass
See original GitHub issueSay I have 2 schemas a.json
and b.json
that generate classes A
and B
.
In b.json
I “inherit” a.json
using the “extends” mechanism.
In the generated classes A
and B
there is a JsonPropertyOrder
annotation that specifies the correct property order; however, when serializing, B
’s properties appear before A
’s properties in the resulting JSON.
Is there a way to make Jackson serialize the super class properties before the subclass?
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Jackson: Property Order and Inheritance - java - Stack Overflow
@JsonPropertyOrder can be used to give specific order in which the details of the data expected in the output json, so using this...
Read more >Inheritance — The Swift Programming Language (Swift 5.7)
When one class inherits from another, the inheriting class is known as a subclass, and the class it inherits from is known as...
Read more >Subclasses of Built-In Types with Properties - MathWorks
When a subclass of a built-in class defines properties, default indexing and concatenation do not work. The default subsref , subsasgn , horzcat...
Read more >abc — Abstract Base Classes — Python 3.11.1 documentation
Register subclass as a “virtual subclass” of this ABC. ... In order to correctly interoperate with the abstract base class machinery, the descriptor...
Read more >FileNet P8 5.5.x - Property inheritance rules - IBM
All built-in, or system, properties assigned to a particular root class are inherited by all its subclasses. Similarly, all custom properties added to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
https://github.com/json-schema-org/json-schema-spec/issues/571 https://github.com/json-schema-org/json-schema-vocabularies/issues/7
Of course, but if you read all the discussion form the start, you’ll see that it’s about the order of properties when inheritance is involved.