liteserver / binn

Binary Serialization
Apache License 2.0
440 stars 58 forks source link

Unable to save function as value in any structures #10

Open nskforward opened 7 years ago

nskforward commented 7 years ago

Is there an opportunity to store and then call a function from binn structures?

kroggen commented 7 years ago

Binn is a serialization format.

It is intended to be used to transfer data between applications, often in different devices.

So storing a pointer to a function would not work.

But you can store Javascript, Python or Lua functions as strings and then parse and execute them on the receiver app.

I don't know if this is a good practice. Generally we send just data to the receiver application that can process it in a function and then send back the result, like a webservice or RPC.