Conversation
…ot JsonbPropertyOrder Signed-off-by: Nathan Rauh <nathan.rauh@us.ibm.com>
|
I'm quite new to Jsonb, so apologies in advance if I've misunderstood something, but annotating a record with That is, the following is deserialized correctly in the order specified by The following is not correctly deserialized: I realize records are a special case, but it seems either the end of 4.2 should be amended to read |
While answering a question from a user, I read through section 4.2 on Customizing Property Order and JsonbPropertyOrder Javadoc regarding whether original property names vs customized property names are used in determining the order.
Section 4.2 is unclear because in one place it defers to
JsonbPropertyOrder,but immediately after that states that
The order is applied to already renamed properties as stated in 4.1, which would contradict JsonbPropertyOrder's statement thatNames must correspond to original names defined in Java class before any customization applied.After rereading these seemingly conflicting statements several times over, I finally realized that the line at the end of section 4.2 isn't meant to apply to
JsonbPropertyOrderthat was discussed immediately before it. Instead, it is intended only forPropertyOrderStrategy.The PR adds clarification to that line of section 4.2 (first commit). A second commit adds a few grammar corrections that I noticed in that same section. If anyone doesn't want the grammar corrections part, just let me know and I'll remove that commit.