---
name: "Catmandu::Fix::export_to_string"
section: "3pm"
platform: "linux"
package: "libcatmandu-perl"
version: "1.2024-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Catmandu::Fix::export_to_string"
---

# Catmandu::Fix::export\_to\_string(3pm)

convert the value of field using a named exporter

## NAME

Catmandu::Fix::export\_to\_string - convert the value of field using a named exporter

## SYNOPSIS

```
    export_to_string(my.field,'YAML')
    export_to_string(my.field2,'JSON')
    export_to_string(my.field3,'CSV', 'sep_char' => ';' )
```

## DESCRIPTION

### export\_string( PATH, NAME \[, EXPORT\_OPTIONS \] )

This fix uses the function export\_to\_string of the package Catmandu, but requires the NAME of the exporter.

It expects a HASH or ARRAY as input. Other values are silently ignored.

- PATH

  - NAME

  name of the exporter to use. As usual in Catmandu, one can choose:

  \* full package name of the exporter (e.g. 'Catmandu::Exporter::JSON')

  \* short package name of the exporter (e.g. 'JSON')

  \* name of the exporter as declared in the Catmandu configuration

- EXPORT\_OPTIONS

  extra options for the named exporter

## AUTHOR

Nicolas Franck, `"<nicolas.franck at ugent.be>"`

## SEE ALSO

Catmandu::Fix
