You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the communication from Lua to JS via C requires complex data structures (Lua tables) to be serialized to JSON in Lua before passed on as a string to the extension and deserialized again in Javascript. The same process but in reverse goes for complex responses from Javascript back to Lua.
The preferred solution is to pass Lua tables to C and let the C code serialize to JSON. Currently there's no support for serializing a Lua table to JSON from C.
Task: Evaluation of JSON parsers in C. Integrate with extension.
We use jsmn internally for json.encode(). This, together with a json.decode() from a yet to be decided lib, should be externalised and made available as part of DMSDK.
Currently the communication from Lua to JS via C requires complex data structures (Lua tables) to be serialized to JSON in Lua before passed on as a string to the extension and deserialized again in Javascript. The same process but in reverse goes for complex responses from Javascript back to Lua.
The preferred solution is to pass Lua tables to C and let the C code serialize to JSON. Currently there's no support for serializing a Lua table to JSON from C.
Task: Evaluation of JSON parsers in C. Integrate with extension.
Perhaps Lua table to JSON and back again should be part of the DMSDK?
The text was updated successfully, but these errors were encountered: