Open
Description
Would be nice to have filter/query cabapilities to (de)serialize only a subset of the Json-B entity per config.
For example:
// (de)serialize only "id", tasks and their name
@JsonbGraph(name= "ItemWithTasks" value = {"id", "tasks", "tasks.name"})
public class Item {
private int id;
private String description;
private Set<Task> tasks;
}
and use it like:
var item = new Item(..);
var toJson = JsonbBuilder.create().withGraph("ItemWithTasks").toJson(item);
var fromJson = JsonbBuilder.create().withGraph("ItemWithTasks").fromJson(toJson)
The @JsonbGraph
can provide capabilities like GraphQL or JPA FetchGraph.
Metadata
Metadata
Assignees
Labels
No labels