Serializes a property of a structure. If an object is not a string, number, array, Boolean, or date, WddxSerializer treats it as a structure.
object.serializeVariable(name
,obj
)
Parameter |
Description |
---|---|
object |
Instance name of a WddxSerializer object |
name |
Property to serialize |
obj |
Instance name of the value to serialize |
Returns a Boolean True if serialization was successful; False, otherwise.
This is an internal function; you do not typically call it.
This example is from the WddxSerializer serializeValue function:
... // Some generic object; treat it as a structure this.write("<struct>"); for (prop in obj) { bSuccess = this.serializeVariable(prop, obj[prop]); if (! bSuccess) { break; } } this.write("</struct>"); ...