jakartaee / jakartaee/jsonb-api

Clarify what property names are used in @JsonbPropertyOrder

Open
#190 3 comments 0 reactions 0 assignees View on GitHub
documentation enhancement
Dominant language
Java
Stars
95
Forks
41
Avg merge
1d 6h
Merged PRs (30d)
35

Description

If I have a JSON-B data class like this:

```java
@JsonbPropertyOrder({"????"})
public class JsonbObject {

@JsonbProperty("identity")
long id;
@JsonbProperty("desc")
String description;
@JsonbProperty("thecost")
double cost;
@JsonbProperty("tstamp")
Date timeStamp;
```

From reading the spec, it is not clear if the String array passed into `@JsonbPropertyOrder` should be the original name of the java properties (`id, description, cost, timeStamp`) or the final JSON-B property names (`identity, desc, thecost, tstamp`).

I am not sure what the original intent of the spec was, but I think that using the final JSON-B property names (`identity, desc, thecost, tstamp`) makes the most sense.

Contributor guide

Open the contributing guide

Research direction

Read the @JsonbPropertyOrder and @JsonbProperty annotation definitions and their specification text first. Determine whether ordering uses Java property names or serialized JSON-B names, then clarify the specification so the accepted property-name form and the example are unambiguous.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.