O
O
Osklizg2017-04-17 16:02:52
Lua
Osklizg, 2017-04-17 16:02:52

How to escape parentheses in lua?

function auto_increment(arg1, arg2, arg3)
box.space.test:auto_increment{arg1, arg2, json.encode(setmetatable({EventTypeBCSM(0) = arg3}, { __serialize="map"}))}end
Please tell me how to escape parentheses in EventTypeBCSM(0) in this example?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Lerg, 2017-04-17
@Osklizg

function auto_increment(arg1, arg2, arg3)
  box.space.test:auto_increment({arg1,
    arg2,
    json.encode(setmetatable({["EventTypeBCSM(0)"] = arg3}, { __serialize="map"}))})
end

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question