Use serialize instead of json for transfer