Skip to content

Clarify what property names are used in @JsonbPropertyOrder #190

Open
@aguibert

Description

@aguibert

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

@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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationInvolves the spec or javadocsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions