Blog này chứa những kiến thức mà mình lượm nhặt được

Java 8 + Java EE 7: POJO to JsonObject Conversion

With Java 8 a java.util.List of domain objects can be easily converted into a javax.json.JsonArray using a Collector created by the Collectors utility. javax.json.JsonObject and javax.json.JsonArray have to be created with the corresponding builder, what makes a Collector implementation necessary: