I have a problem to jsonize a list of objects. Objects are retrieved from DB and sometimes, they are proxified. After going step by step in source code, I've realized that in JSonConfig.findJsonBeanProcessor method, the searched target equals "mypackage.model.contact.Contact$$EnhancerByCGLIB$$f17985d4". Consequently, no JsonBeanProcessor is found, since I've registered one for "mypackage.model.contact.Contact".
Does anybody know how I can do to avoid this problem ? is this a bug or is there a workaround ?
Thanks in advance
--
Vincent FUCHS
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The code that performs the lookup does an exact class match so it won't pick a subclass, which may be seen as a shortcoming in your case. Searching for a subclass means looking up the most narrow match in the whole class registry, this operation may take some time depending on the number of processors registered. I think it may be a good idea to have this behavior but not enabled by default.
Can your register a Feature Request for this one please ?
Cheers,
Andres
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have a problem to jsonize a list of objects. Objects are retrieved from DB and sometimes, they are proxified. After going step by step in source code, I've realized that in JSonConfig.findJsonBeanProcessor method, the searched target equals "mypackage.model.contact.Contact$$EnhancerByCGLIB$$f17985d4". Consequently, no JsonBeanProcessor is found, since I've registered one for "mypackage.model.contact.Contact".
Does anybody know how I can do to avoid this problem ? is this a bug or is there a workaround ?
Thanks in advance
--
Vincent FUCHS
Hi Vincent,
The code that performs the lookup does an exact class match so it won't pick a subclass, which may be seen as a shortcoming in your case. Searching for a subclass means looking up the most narrow match in the whole class registry, this operation may take some time depending on the number of processors registered. I think it may be a good idea to have this behavior but not enabled by default.
Can your register a Feature Request for this one please ?
Cheers,
Andres