LassoScript Utility
Basics Browse Detail


Tag Link [Null->Serialize] Category Tags
Type Member Source Available No
Support Preferred Version 5.0
Change Unchanged Data Source Any
Output Type String Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0


[Null->Serialize] converts the value to an XML representation. The returned string can be stored in a database.

Member tags for Null can be used on values of any data type including custom, third party data types.




No Parameters Required.

Change Notes

The serialization format in LP7 is XML-based. Prior versions of Lasso used a byte stream serialization format. LP7 can deserialize data that was serialized using an earlier version of Lasso.


To convert a type to an xml representation and then convert it back:

Use the [Null->Serialize] tag. The following example converts an array into its xml representation using the [Null->Serialize] tag, then converts it back using the [Null->UnSerialize] tag.

[Variable: 'myArray'=(Array: 'one', 'two', 'three')]
[Variable: 'XML'=$myArray->Serialize]
[Variable: 'newArray'=null]
[$newArray->(Unserialize: $XML)]
[output: $newArray]

(Array: (one), (two), (three))