Skip to main content
Version: Next

print_xsv

Prints a record as a delimited sequence of values.

print_xsv(input:record, field_separator=str, list_separator=str, null_value=str) -> string

Description

The parse_xsv function prints a record's values as delimiter separated string.

The following table lists existing XSV configurations:

FormatField SeparatorList SeparatorNull Value
csv,;empty
ssv<space>,-
tsv\t,-

field_separator = str

The string separating different fields.

list_separator = str

The string separating different elements in a list within a single field.

null_value = str

The string denoting an absent value.

Examples

from {x:1, y:true, z: "String"}
output = this.print_xsv(
  field_separator=",",
  list_selarator=";",
  null_value="null")
{
  x: 1,
  y: true,
  z: "String",
  output: "1,true,String",
}

See Also

parse_xsv, write_xsv