toedter / spring-hateoas-jsonapi

A JSON:API media type implementation for Spring HATEOAS
Apache License 2.0
106 stars 15 forks source link

Fix order of serialized meta properties #64

Closed toedter closed 2 years ago

toedter commented 2 years ago

When properties are annotated with @JsonApiMeta, the json serialization order is random. Keep the order that was defined in the source code.

This would also change the order of pagination meta to:

  "meta": {
    "page": {
      "size": 2,
      "totalElements": 2,
      "totalPages": 2,
      "number": 1
    }
  }

which is now the same order used by Spring HATEOAS.