From d986df72796a72e8c1488a3834a36432162bc726 Mon Sep 17 00:00:00 2001 From: Nathan Rauh Date: Mon, 28 Apr 2025 15:01:52 -0500 Subject: [PATCH 1/2] Clarify that renamed properties are used for PropertyOrderStrategy, not JsonbPropertyOrder Signed-off-by: Nathan Rauh --- spec/src/main/asciidoc/jsonb.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/src/main/asciidoc/jsonb.adoc b/spec/src/main/asciidoc/jsonb.adoc index 19e94f4..217781e 100644 --- a/spec/src/main/asciidoc/jsonb.adoc +++ b/spec/src/main/asciidoc/jsonb.adoc @@ -630,7 +630,7 @@ The way to set custom property order strategy is to use `jakarta.json.bind.Jsonb 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`. -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 From 26601186adf57733ac5ee8149594e8ea8fc5ef85 Mon Sep 17 00:00:00 2001 From: Nathan Rauh Date: Mon, 28 Apr 2025 15:18:25 -0500 Subject: [PATCH 2/2] Grammar improvements to the section on Customizing Property Order --- spec/src/main/asciidoc/jsonb.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/src/main/asciidoc/jsonb.adoc b/spec/src/main/asciidoc/jsonb.adoc index 217781e..f3be19e 100644 --- a/spec/src/main/asciidoc/jsonb.adoc +++ b/spec/src/main/asciidoc/jsonb.adoc @@ -616,7 +616,7 @@ 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. @@ -624,11 +624,11 @@ Class `jakarta.json.bind.config.PropertyOrderStrategy` provides the most common * 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`. A `PropertyOrderStrategy` determines the order based on the already renamed properties that have been customized according to the rules outlined under section 4.1.