diff --git a/docs/src/docs/user-guide.adoc b/docs/src/docs/user-guide.adoc index 041f529..50ce1eb 100644 --- a/docs/src/docs/user-guide.adoc +++ b/docs/src/docs/user-guide.adoc @@ -285,13 +285,15 @@ or using @JsonbPropertyOrder annotation on class: [source,java] ---- -@JsonbPropertyOrder(PropertyOrderStrategy.ANY) +@JsonbPropertyOrder({ "profession", "name" }) public class Person { private String name; private String profession; } ---- +IMPORTANT: `@JsonbPropertyOrder` takes property names and not a `PropertyOrderStrategy`. + ==== Ignoring properties Class properties annotated with @JsonbTransient annotation are ignored by JSON Binding engine. The behavior is different depending on where @JsonbTransient annotation is placed. @@ -697,4 +699,4 @@ Jsonb jsonb = JsonbBuilder.create(config); - JSON-B official web site: http://json-b.net - Specification project: http://github.com/javaee/jsonb-spec - JSR-367 page on JCP site: https://jcp.org/en/jsr/detail?id=367 -- Yasson (Reference Implementation): https://projects.eclipse.org/projects/rt.yasson \ No newline at end of file +- Yasson (Reference Implementation): https://projects.eclipse.org/projects/rt.yasson