0

is there an easy way in .Net to convert Lua table to something else (XML, datatable, array etc.) I google it for few hours but i don't ask google right or there is no easy way :-)

Thanks!

2 Answers 2

4

If your table keys and values are simple, start from this code:

for k,v in pairs(t) do
    print("<"..k..">"..tostring(v).."</"..k..">")
end
Sign up to request clarification or add additional context in comments.

Comments

1

If performance is not a problem, you can try and use an intermediate representation, like JSON. Have a look at JSON4Lua ( http://json.luaforge.net/ ) and Json.NET ( http://json.codeplex.com/ ). See http://www.json.org/ for other implementations.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.