serialize
can.Map.prototype.attributes.serialize
Serializes the observe's properties using the attribute plugin.
observe.serialize([attrName])
Parameters
-
attrName
{String}
OptionalIf passed, returns only a serialization of the named attribute.
Returns
{String}
A serialization of this Observe.
You can set the serialization methods similar to the convert methods:
You can also get and serialize an individual property by passing the attribute name to the
serialize
function. Building on the above demo, we can serialize thebirthday
attribute only.