API / AceSerializer-3.0

AceSerializer-3.0 can serialize any variable (except functions or userdata) into a string format, that can be send over the addon comm channel.
AceSerializer was designed to keep all data intact, especially very large numbers or floating point numbers, and table structures. The only caveat currently is, that multiple references to the same table will be send individually.

AceSerializer-3.0 can be embeded into your addon, either explicitly by calling AceSerializer:Embed(MyAddon) or by specifying it as an embeded library in your AceAddon. All functions will be available on your addon object and can be accessed directly, without having to explicitly call AceSerializer itself.
It is recommended to embed AceSerializer, otherwise you'll have to specify a custom `self` on all calls you make into AceSerializer.


Deserializes the data into its original values.
Accepts serialized data, ignoring all control characters and whitespace.


The serialized data (from :Serialize)

Return value

true followed by a list of values, OR false followed by an error message


Serialize the data passed into the function.
Takes a list of values (strings, numbers, booleans, nils, tables) and returns it in serialized form (a string).
May throw errors on invalid data types.


List of values to serialize

Return value

The data in its serialized form (string)

You must login to post a comment. Don't have an account? Register to get one!

  • 1 comment
  • Avatar of crazedfred crazedfred Jan 06, 2011 at 23:24 UTC - 0 likes

    As per galmok's request, I have added a comment to LibCompress about how to use LibCompress, AceSerializer, and AceComms to efficiently send arbitrary Lua data over an Addon message. You can view the comment here (just scroll down if the link doesn't quite work):

    Last edited Jan 06, 2011 by crazedfred
  • 1 comment