Serializable

(in ./Carbon/Serializable.lua)

Deprecated in Carbon 1.2.0: this class will be removed in Carbon 2.0.

Abstract

Provides an interface to serialize and deserialize data.

All methods provided by this class that are not overridden throw a NotImplementedException.

Inherits OOP.Object


Methods

class public Serializable.Deserialize(string source, Serializable out)

Returns Serializable out

  • required source: A string containing a serialized representation of an instance of this class.
  • optional out: Where to place the resulting data.

Deserializes the given source string and places it into the given Serializable out object, if given, or a new instance of the class.


object public Serializable:Deserialize!(string source)

Returns self

  • required source: A string containing a serialized representation of an instance of this class.

Deserializes a previously serialized instance of this class. Places the data into the class this method is called on.

Can be called with self:Deserialize!(source) in Carbide Lua.


object public Serializable:Serialize()

Returns string

Serializes the object into a string representation.


Properties

[none]