Added value_to_native and value_from_native methods to serializer to fix...

... #1205.