Easy to use serialization library for Warhammer.
Features
- Supports the use of most data types as table keys, including tables, booleans, and wstrings.
- Tables containing circular references are properly serialized and references restored when deserialized.
- Functions cannot be pickled, instead they are replaced by a wstring to allow pickling of large objects and table structures without having to remove them first, try pickling GameData or SystemData sometime!
- All serialized data is output as wstrings.
- Low serialization overhead, strings are as compact and short as possible
Loading LibPickle
- Copy LibPickle.lua and LibStub.lua to your project and add the following to the files section of your .mod file
<File name="LibStub.lua" /> <File name="LibPickle.lua" />
Using LibPickle
Once loaded you can either use LibStub to reference LibPickle
LibPickle = LibStub("LibPickle-0.1")
then
LibPickle.pickle(table)
LibPickle.unpickle(wstring)
or you can just use the global function directly without the nead to use a local reference to LibPickle
outputWString = Pickle(table) -- will output wstring restoredTable = Unpickle(outputWString) -- will output table
- Note: If you need a to access a specific version of LibPickle, use the LibStub method instead of the global, which will be overwritten by the last version loaded
Happy pickling!
Addons Using LibPickle
- If you use LibPickle in your addon leave me a message and I'd love to add your addon to the list
Facts
- Date created
- 30 Jan 2009
- Categories
- Last update
- 31 Jan 2009
- Development stage
- Inactive
- Language
- enUS
- License
- MIT License
- Curse link
- LibPickle
- Reverse relationships
- 1
- Recent files
- B: beta-0.2.2 for Beta 3.0 on 31 Jan 2009
- A: r13 for Beta 3.0 on 31 Jan 2009
- B: beta-0.2.1 for Beta 3.0 on 31 Jan 2009
- A: r10 for Beta 3.0 on 31 Jan 2009
- B: beta-0.1.1 for Beta 3.0 on 30 Jan 2009