Differences
This shows you the differences between two versions of the page.
Both sides previous revision
Previous revision
|
Next revision
Both sides next revision
|
en:serialize [2016/09/08 13:48] admin |
en:serialize [2016/09/08 14:01] admin |
=== Format of the Serialized Array === | === Format of the Serialized Array === |
| |
The string representing the array's data is a series of values separated by a colon ':'. The first value represents the number of rows and the second the number of columns. A one dimensional array will have a single row (1), with the length in the second value. The elements of the array follow. The first character of each value contains a type (0-unassigned, 1-integer, 2-float, and 3-string) and the actual array data follows. Strings are converted to hexadecimal so that any Unicode or special characters will be stored without change. The strings returned will contain ONLY ':', '.', '0'-'9', and 'a'-'f'. | The string representing the array's data is a series of values separated by a colon ':'. The first value represents the number of rows and the second the number of columns. A one dimensional array will have a single row (1), with the length in the second value. The elements of the array follow. The first character of each value contains a marker byte defining the data type ('0'-unassigned, '1'-integer, '2'-float, and '3'-string). The actual array data follows. Strings are converted to hexadecimal so that any Unicode or special characters will be stored without change. The strings returned will contain ONLY ':', '.', '0'-'9', and 'a'-'f'. |
| |
The array {1,2,3,4,5.555,"six"} would be serialized to "1:6:11:12:13:14:25.555:3736978" and the array {{1,2},{3,4}} would be serialized to "2:2:11:12:13:14". | The array {1,2,3,4,5.555,"six"} would be serialized to "1:6:11:12:13:14:25.555:3736978" and the array {{1,2},{3,4}} would be serialized to "2:2:11:12:13:14". |