Scroll to navigation

Catmandu::Fix::export_to_string(3pm) User Contributed Perl Documentation Catmandu::Fix::export_to_string(3pm)

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.

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

extra options for the named exporter

AUTHOR

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

SEE ALSO

Catmandu::Fix

2023-03-03 perl v5.36.0