Skip to content

Encoding

Encode and decode JSON, and decode CSV.

csvdecode

csvdecode(str) → list(map(string))

Decode a CSV string into a list of maps (first row = headers).

ParameterTypeDescription
strstring

jsondecode

jsondecode(str) → any

Decode a JSON string into a value.

ParameterTypeDescription
strstring

jsonencode

jsonencode(value) → string

Encode a value as a JSON string.

ParameterTypeDescription
valueany
jsonencode({name = "alice", age = 30})

→ "{\"name\":\"alice\",\"age\":30}"