These functions are responsible for correct transferring objects via rpc channel.
To reach that some specific kind of objects is converted to json in some custom way
and then, after receiving, revived to objects again,
so there is feeling that object was transferred via rpc channel.
To distinguish between regular and altered objects, field $type is added to altered ones.
Also value of that field specifies kind of the object.
These functions are responsible for correct transferring objects via rpc channel.
To reach that some specific kind of objects is converted to json in some custom way and then, after receiving, revived to objects again, so there is feeling that object was transferred via rpc channel.
To distinguish between regular and altered objects, field $type is added to altered ones. Also value of that field specifies kind of the object.