Name
DeserializeTable -- deserialize string to table (V9.0)
Synopsis
table = DeserializeTable(s$[, t])
Deprecated syntax
table = DeserializeTable(s$[, adapter])
Function
This function deserializes the string specified by s$ to a table and returns it.

The optional table argument t can be used to specify the following additional options:

Adapter:
The table will be deserialized using the deserializer that is specified in the Adapter tag. This can be the name of an external deserializer plugin (e.g. xml) or it can be one of the following inbuilt deserializers:

Default:
Use Hollywood's default deserializer. This will deserialize data from the JSON format to a Hollywood table. This is also the default if no other default has been set using SetDefaultAdapter().

Inbuilt:
Use Hollywood's legacy deserializer. Using this deserializer is not recommended any longer as the data is in a proprietary, non-human-readable format. Using JSON is a much better choice.

UserTags:
This tag can be used to specify additional data that should be passed to serializer plugins. If you use this tag, you must set it to a table of key-value pairs that contain the additional data that should be passed to plugins. See User tags for details. (V10.0)

Mode:
This tag can be used to set the serialization mode to use for the operation. It defaults to the serialization mode set using SetSerializeMode(). See SetSerializeMode for details. (V10.0)

Options:
This tag can be used to set the serialization options to use for the operation. It defaults to the serialization options set using SetSerializeOptions(). See SetSerializeOptions for details. (V10.0)

SrcEncoding:
This tag can be used to specify the source character encoding. This defaults to the string library's default character encoding as set by SetDefaultEncoding(). See SetDefaultEncoding for details. (V10.0)

DstEncoding:
This tag can be used to specify the destination character encoding. This defaults to the string library's default character encoding as set by SetDefaultEncoding(). See SetDefaultEncoding for details. (V10.0)

If the Adapter tag isn't specified, it will default to the default set using SetDefaultAdapter().

Tables can be serialized to strings using the SerializeTable() function. See SerializeTable for details.

Inputs
s$
string to deserialize
t
optional: table specifying further options (see above)
Results
table
table deserialized from string
Example
See SerializeTable


Show TOC