serialize
Type: Function
Encode an object as a string.
Several serialization formats are supported. The default format, if not specified, is “json”.
Notes
This function is often useful when you need to pass a data structure to an artifact parameter when the parameter expects a specific format. For example:
SELECT * FROM Artifact.Linux.Search.FileFinder(
SearchFilesGlobTable=serialize(format="csv",item=tlist),...)
will pass a list in CSV format to the artifact’s
SearchFilesGlobTable parameter.
See also
- str: Returns the string representation of the provided data.
| Argument | Type | Description |
|---|---|---|
item |
Any (required) | The item to encode |
format |
string | Encoding format (csv,json,yaml,hex,base64) |
Platforms: macOS, Linux, Windows