3pillarlabs/spring-data-simpledb — pull request #4 by doom777 (2014-05-15 22:32:24+00:00)
Title: Add custom field serialization

Sometimes, you must serialize fields manually, as default serialization breaks. I had this trouble with trying to serialize a User object with SimpleGrantedAuthority list, as SimpleGrantedAuthority doesn't have a default constructor, and breaks Jackson.

This addition allows to create your own serialization and deserialization classes for individual fields. It is based largely on JSONFieldWrapper/JSONMarshaller, but adds custom serialization.

this serialization takes priority over others; as long as custom serialization is called, all others including Reference, Nested, simple, etc, are ignored.

Annotating a field with @CustomSerialize and @Reference of @Attributes or @ID will cause an error, as a CustomSerialize cannot be combined with other types of serialization.