I have one super class Field and there are two other classes that inherit the super class Field.
I want to dynamically add subclass without affecting super class changes
public class TestConfiguration {
private List<Field> fields;
}
I want to use the mapping in this way when fields is instance of same class Field then without className property "Field" used for mapping
{
"fields" : [ {
"name" : "First_name",
"type" : {
"fieldType" : {
"name" : "string"
}
},
"required" : true
}]
}
I want to use the mapping in this way when fields is instance of child class ExtendedHierarchicalField then className property "ExtendedHierarchicalField" used for mapping or any other way for mapping the objects
{
"fields" : [ {
"className" : "ExtendedHierarchicalField",
"name" : "First_name",
"type" : {
"fieldType" : {
"name" : "string"
}
},
"required" : true
}]
}