I am developing a client on the Lua 3.2 programming language.
As will be used in a legacy project, the Lua version being used is 3.2
By defining a simple API like this
class Math(object):
def sum(self, a, b):
return a + b
When calling the API client in the Lua
local px = proxy('PYRO:obj_5d871322110a4062b25d7a21bc34ae8e@localhost:59249')
px:start_connection()
local a, b = 2, 3
local result = px.sum(2, 3)
if type(result) == 'number' then
println(format("%d + %d = %d", a, b, result))
else
tprint(result)
end
Using json serializer, I have to pass parameters of type 'kwargs' for remote function. Otherwise I get an error
I am developing a client on the Lua 3.2 programming language. As will be used in a legacy project, the Lua version being used is 3.2
By defining a simple API like this
When calling the API client in the Lua
Using json serializer, I have to pass parameters of type 'kwargs' for remote function. Otherwise I get an error
When calling the api with any parameter: https://github.com/alexsilva/Pyrolite/blob/lua-dev/lua32/core.lua#L55
I get a new error:
You can see that there is a problem in json serializer here: https://github.com/irmen/Pyro4/blob/master/src/Pyro4/util.py#L494
This could be written this way:
Because even without declaring 'kwargs' in function, is valid for the python: