At the moment it uses the source object type when it tried to copy a bean to an object. The issue is when there are fields in the source type get initialised with default value, while the source bean doesn't have any value on the fields, then it will generate a bean with combination of source value plus default value which is not defined in source bean. This is a side effect which we don't have specifically when we haven't specify the target type.
Using JSONObject can safely workaround the side effect while keeping the semanic of mapping
At the moment it uses the source object type when it tried to copy a bean to an object. The issue is when there are fields in the source type get initialised with default value, while the source bean doesn't have any value on the fields, then it will generate a bean with combination of source value plus default value which is not defined in source bean. This is a side effect which we don't have specifically when we haven't specify the target type.
Using
JSONObject
can safely workaround the side effect while keeping the semanic of mapping