narayana1208 / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

some other standard ExclusionStrategy needed #194

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.The purpuse of using json is to be less verbose: in different contexes we 
won't represent the same pojo by the same fields (we usually use a few 
fields in the object for a given task)

What is the expected output? What do you see instead?
I think it could be a good idea to include in the standard ExclusionStrategy  
implementations two additional classes that will just 
use field names in a class context, we then construct a serializer for each 
business context or ejb:
1- inclusion strategy by field name
2- exclusion strategy by field name

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by zhamdi.into on 12 Feb 2010 at 9:19

GoogleCodeExporter commented 9 years ago

Original comment by limpbizkit on 6 Oct 2010 at 5:55

GoogleCodeExporter commented 9 years ago
The library flexjson is adapted to these features in java code. 

Original comment by zhamdi.into on 7 Oct 2010 at 7:47

GoogleCodeExporter commented 9 years ago
Is there a reason that you can not do this now with Gson? The exclusion 
strategy has a "FieldAttributes" object as part of its API. The FieldAttributes 
object has information about the "parent" class (class the possesses this 
field) and the field's name.

Original comment by joel.leitch@gmail.com on 13 Apr 2011 at 4:33

GoogleCodeExporter commented 9 years ago
Hi Joel,

This post is too old, (feb 10). I didn't follow the evolution of the product, 
it's possible it is supported nowadays.

Original comment by zhamdi.into on 13 Apr 2011 at 8:17

GoogleCodeExporter commented 9 years ago
Marking as invalid since it is now obsolete.

Sorry for not following up on this right away.

Original comment by joel.leitch@gmail.com on 13 Apr 2011 at 11:46