Commit e128c1a4 authored by Grayside's avatar Grayside Committed by mikeryan
Browse files

Issue #2780965 by Grayside: Add support for original data values with JSON data_parser plugin

parent adbd5eac
......@@ -7,6 +7,13 @@ source:
plugin: url
data_fetcher_plugin: http
data_parser_plugin: json
# The data_parser normally limits the fields passed on to the source plugin
# to fields configured to be used as part of the migration. To support more
# dynamic migrations, the JSON data parser supports including the original
# data for the current row. Simply include the 'include_raw_data' flag set
# to `true` to enable this. This option is disabled by default to minimize
# memory footprint for migrations that do not need this capability.
# include_raw_data: true
# Normally, this is one or more fully-qualified URLs or file paths. Because
# we can't hardcode your local URL, we provide a relative path here which
# hook_install() will rewrite to a full URL for the current site.
......@@ -116,6 +116,9 @@ class Json extends DataParserPluginBase implements ContainerFactoryPluginInterfa
$this->currentItem[$field_name] = $field_data;
if (!empty($this->configuration['include_raw_data'])) {
$this->currentItem['raw'] = $current;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment