As I understand it, a PropertyNameProcessor allows a JSON key to be matched
to a bean property name when deserializing JSON content to a bean.
However, it would be helpful to "close the circle", i.e. to have a way to
also map bean properties to JSON keys when generating JSON content from a
bean. Otherwise, round-trip (un)marshalling would be a problem.
Instead of defining a new interface, how about extending the existing
PropertyNameProcessor interface with a method that does the reverse
lookup?
(Use case: generate JSON from JAXB annotated classes, where fields have
annotations that specify a different name for the marshalled property.)
aalmiray
Interface Improvements (example)
None
Public
|
Date: 2008-06-29 20:18
|
|
Date: 2008-06-19 07:08
|
|
Date: 2008-06-18 23:42
|
|
Date: 2008-06-18 08:18
|
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2008-06-29 20:18 | aalmiray |
| close_date | - | 2008-06-29 20:18 | aalmiray |
| assigned_to | nobody | 2008-06-18 23:42 | aalmiray |