Default Implementation of JsonbAdapter
Im struggling with a JonsbAdapter. Here is my Code:
public class JsonbCusomerAdapter implements JsonbAdapter<CustomerEntity, JsonString> { @Override public JsonString adaptToJson(CustomerEntity orgnl) throws Exception { // What to do here?! } @Override public CustomerEntity adaptFromJson(JsonString customerId) throws Exception { CustomerEntity c = new CustomerEntity(); c.setName("Hulk Hogan"); c.setID(customerId.getString()); return c; } }
actually I just want to override the adaptFromJson-Method. Is there a way to call a default implementation of the adaptToJson? How would a default implementaion look like? Also a default impl of the adaptFrom Json would be interesting.