Allow to use custom serializer with primitive type

This patch will allow to create custom handles for primitive types (strings for example)

(i use it make translations during serialization)