Closed joaocpsantos closed 9 years ago
Updated, added a FieldNameResolver that resolves and caches field names.
Updated. Considering we may have multiple Gsons with multiple FieldNamingStrategies, then, we need multiple caches for each FieldNamingStrategy. Since for each strategy we want a single cache, access to creating the cache must be synchronized.
Added ConcurrentWeakHashMap from grizzly-utils 1.9.62.
:+1:
:+1: I think this is a very nice feature!
This PR allows to remove attributes from the serialized JSON, based on the evaluation of a strategy defined with an attribute annotation. In order to get the field name, we have to access private attributes of gson classes to get the FieldNamingStrategy. After getting it, it is cached and we keep using it instead of getting it again.