[JW Lua] Serialize data (write to/read from file)
Jari Williamsson
jari.williamsson at mailbox.swipnet.se
Fri Nov 15 08:07:05 CET 2013
Perhaps I should mentioned this again regarding save/restore to a file:
a great way to save data is to save it to a Lua file that can later be
executed. That way, you just need the code to save the file, and you get
a file format that's readable.
Best regards,
Jari Williamsson
On 2013-11-14 22:53, Jari Williamsson wrote:
> 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
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
>
More information about the JWLua
mailing list