Hi Harald,
First off, no problem & thanks for the response / great work on Piriti to date!
But that is not necessary IMO. If you want to skip a property just don't include it in the @Mappings annotations. AFAICR only the properties in the @Mappings annotation will be processed.
This is what I thought as well but it looks like it picks up all of the properties even if you define explicit @Mapping's for only a subset of the properties.
The reason I'm trying to work around this problem is that I have some sections of an object graph (with circular references) that I don't want to (de)serialize. I'm thinking that I might be able to solve this problem by using a custom getter; however, I'm not sure how widely supported this feature of the @Mapping is; I found it in the source not the docs and saw some unexpected behaviors when using it before such as:
- Needing to place a valid property into the code even though I wanted to use a custom getter to create a fabricated property at write time (i.e. I wanted to include type information in the JSON document on write).
- Needing to define the custom getter on the writer definition for all sub-classes of a type hierarchy.
It would be great if you could take a look at the project and:
- See if you can spot anything wrong that I'm doing in terms of having all properties de-serialized even if I only explicitly map a few.
- Give any feedback you have on the technique I'm using to support two-way polymorphism / inheritance between the server & GWT app (I needed to use a custom Getter to solve the gwt -> server communication; however, I think this could be fixed if Piriti was to implement type support functionality in a similar way to Jackson on the server side).
Hope you have a great weekend.
Cheers,
Jamie