Skip to content

Section 4.2 is unclear #371

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions spec/src/main/asciidoc/jsonb.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -616,21 +616,21 @@ If duplicate name is found exception MUST be thrown. The definition of duplicate

=== Customizing Property Order

To customize the order of serialized properties, JSON Binding provides `jakarta.json.bind.config.PropertyOrderStrategy` class.
To customize the order of serialized properties, JSON Binding provides the `jakarta.json.bind.config.PropertyOrderStrategy` class.

Class `jakarta.json.bind.config.PropertyOrderStrategy` provides the most common property order strategies.

* LEXICOGRAPHICAL
* ANY
* REVERSE

The detailed description of property order strategies can be found in javadoc.
Detailed descriptions of property order strategies can be found in the javadoc.

The way to set custom property order strategy is to use `jakarta.json.bind.JsonbConfig::withPropertyOrderStrategy` method.
Use the `jakarta.json.bind.JsonbConfig::withPropertyOrderStrategy` method to configure a custom property order strategy.

To customize the order of serialized properties only for one specific type, JSON Binding provides `jakarta.json.bind.annotation.JsonbPropertyOrder` annotation. Order specified by `JsonbPropertyOrder` annotation overrides order specified by `PropertyOrderStrategy`.
To customize the order of serialized properties only for one specific type, JSON Binding provides the `jakarta.json.bind.annotation.JsonbPropertyOrder` annotation. The order specified by the `JsonbPropertyOrder` annotation overrides the order specified by `PropertyOrderStrategy`.

The order is applied to already renamed properties as stated in 4.1.
A `PropertyOrderStrategy` determines the order based on the already renamed properties that have been customized according to the rules outlined under section 4.1.

=== Customizing Null Handling

Expand Down