Open
Description
I have a interface model like:
public interface Customer {
String getName();
Address getAddress();
}
public interface Address {
String getStreet();
String getCity();
}
For each interface there is a single implementation.
Important to note that the model contains nested properties/types using (again) interfaces.
How can this be parsed?
JsonbConfig config = new JsonbConfig()
// TODO: what configuration to add to map interfaces to concrete implementations?
Jsonb jsonb = JsonbBuilder.create(config)
jsonb.fromJson(json, Customer.class);
Above gives exception: javax.json.bind.JsonbException: interface com.acme.Customer not instantiable
Note: I cannot change the interfaces nor the concrete implementations as these are provided.
Metadata
Metadata
Assignees
Labels
No labels