I remembered one more think.
Remote net.box convents nils to box.NULLs but your approach with {...} ignores it.
Please, change pairs({...}) to select(). Also it's interesting to see following cases: uuid and decimal (but only for 2.3+)
Notice that net.box:call can't send and receive functions.


`function() return uuid() end` returns an error  in this implementation:
```

- error: '[string "return require(''uuid'')():__serialize()"]:1: ''struct tt_uuid''

    has no member named ''__serialize'''

```

But remote net.box returns:
```

- error: unsupported Lua type 'cdata'


```

Also please see https://github.com/tarantool/tarantool/issues/4602

It seems that correct way is to use msgpack.decode(msgpack.encode()), but it will lead to performance degradation
so the problem should be discussed more closely.

Четверг, 7 ноября 2019, 17:27 +03:00 от Maria Khaydich <maria.khaydich@tarantool.org>:

Thank you for the comment!
I’ve checked the behavior and previous version does not indeed cover the case with box.NULL. Suitable fix and tests were added. 
 
Четверг, 7 ноября 2019, 17:08 +03:00 от Бабин Олег <olegrok@tarantool.org>:
 
Maria, thanks for your patch!

But as I see you don't consider the case of box.NULL that has 'cdata' type, but doesn't have
__serialize metamethod.

It will lead to an error:
```

- error: '[string "return x:__serialize()"]:1: ''void *'' has no member named ''__serialize'''

...
```

Четверг, 7 ноября 2019, 16:47 +03:00 от Maria <maria.khaydich@tarantool.org>:

+ if type(res) == 'cdata' then
+ results[n] = res:__serialize()
+ end


-- 
Oleg Babin
 
 
--
Maria Khaydich
 

--
Oleg Babin