The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Catmandu::Fix::get_json - get JSON data from an URL as fix function

SYNOPSIS

        # returns the hash
        get_json("http://example.com/json")

        # stores the in path.key
        get_json("http://example.com/json", path: path.key)

DESCRIPTION

This Catmandu::Fix provides a method to fetch JSON data from an URL. The response is added as new item or to a field of the current item.

OPTIONS

By now the only additional option of Catmandu::Importer::getJSON supported by this fix function are dry and cache. Future releases will also support setting the URL to a field value of the current item.