[JW Lua] Serialize data (write to/read from file)

Jari Williamsson jari.williamsson at mailbox.swipnet.se
Thu Nov 14 22:53:47 CET 2013


On 2013-11-14 21:00, Bart Visser wrote:

> I regularly have to ‘transfer' a song from one layout into another
> (say if one song has to be in two different hymnbooks). Because of
> all the power we now have with JW Lua, I’m looking into a way to
> transform the layout of a score. In order to do so, I need a
> way to save layout-data (such as fonts, system-margins and the
> placements of file-info texts). Is there a way to serialize
> JW Lua-data (or just a Lua table) for later retrieval?

Somewhere in the future, I hope to have save/retrieval both to/from temp 
memory and a preference file.

For now, you can use the standard io library (included in JW Lua) to 
read/write text or binary files.

> I’ve installed a few rocks (luajson, luayaml), but can’t
> seem to use those from within JW Lua.

LuaRocks isn't supported at this time. I'll put that on the feature 
suggestion list.


Best regards,

Jari Williamsson





More information about the JWLua mailing list