Skip to content
This repository has been archived by the owner on Feb 15, 2019. It is now read-only.

reducing the ambiguity of JsonbPropertyOrder example in the user guide #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/src/docs/user-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
- Yasson (Reference Implementation): https://projects.eclipse.org/projects/rt.yasson