Implemented serializer that manages pointer and shared_ptr